<html>
<head><meta charset="utf-8"><title>migration bug · t-compiler/wg-rfc-2229 · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/index.html">t-compiler/wg-rfc-2229</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html">migration bug</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="244659659"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244659659" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244659659">(Jul 02 2021 at 04:54)</a>:</h4>
<p>Just an update that I'm still investaging the ICE</p>
<p>So there seems to be two bugs:</p>
<ul>
<li>One was Drop check failing</li>
<li>Something weird is happening in the has_signifciant_dtor check. I tried replacing it with needs_drop and the ICE is still there</li>
</ul>



<a name="244659661"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244659661" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244659661">(Jul 02 2021 at 04:54)</a>:</h4>
<p><a href="http://csclub.uwaterloo.ca/~a52arora/tokio_error">http://csclub.uwaterloo.ca/~a52arora/tokio_error</a></p>



<a name="244677790"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244677790" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244677790">(Jul 02 2021 at 09:19)</a>:</h4>
<p><span class="user-mention" data-user-id="281950">@Aman Arora</span> do you want me to take a look?</p>



<a name="244677794"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244677794" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244677794">(Jul 02 2021 at 09:19)</a>:</h4>
<p>also, do we have a more minimized repro?</p>



<a name="244678091"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244678091" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244678091">(Jul 02 2021 at 09:22)</a>:</h4>
<p>I don't have a minimized repro</p>



<a name="244678111"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244678111" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244678111">(Jul 02 2021 at 09:22)</a>:</h4>
<p>I tried a couple things but so far no luck</p>



<a name="244732883"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244732883" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244732883">(Jul 02 2021 at 17:21)</a>:</h4>
<p>So I'm wondering <span class="user-mention" data-user-id="281950">@Aman Arora</span> if this is the same bug as <a href="https://github.com/rust-lang/rust/issues/84841">https://github.com/rust-lang/rust/issues/84841</a></p>



<a name="244732906"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244732906" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244732906">(Jul 02 2021 at 17:21)</a>:</h4>
<p>I might look at that issue, which has a nice minimal repro, and see if I can figure out the problem</p>



<a name="244732915"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244732915" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244732915">(Jul 02 2021 at 17:21)</a>:</h4>
<p>and then see if it applies to this issue</p>



<a name="244733054"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244733054" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244733054">(Jul 02 2021 at 17:22)</a>:</h4>
<p>Okay thank you</p>



<a name="244733107"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244733107" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244733107">(Jul 02 2021 at 17:23)</a>:</h4>
<p>It's possible the bug exists outside of the work we did</p>



<a name="244733788"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244733788" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244733788">(Jul 02 2021 at 17:28)</a>:</h4>
<p>if it helps I can reduce the reqwest/hyper ICE</p>



<a name="244742211"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244742211" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244742211">(Jul 02 2021 at 18:39)</a>:</h4>
<p>(I think there was an assumption that the ICE happened during migration for user code that wouldn't compile and I'm not seeing that for reqwest/hyper btw. Maybe this was meant in the context where the migrated code wouldn't compile ?)</p>



<a name="244742411"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244742411" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244742411">(Jul 02 2021 at 18:41)</a>:</h4>
<p>I had a similar issue within rustc itself which got resolved by  that check</p>
<p>EDIT: removing that check</p>



<a name="244742635"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244742635" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244742635">(Jul 02 2021 at 18:43)</a>:</h4>
<p>there you go</p>
<div class="codehilite" data-code-language="Rust"><pre><span></span><code><span class="k">use</span><span class="w"> </span><span class="n">std</span>::<span class="n">future</span>::<span class="n">Future</span><span class="p">;</span><span class="w"></span>
<span class="k">struct</span> <span class="nc">Runtime</span><span class="p">;</span><span class="w"></span>
<span class="k">impl</span><span class="w"> </span><span class="n">Runtime</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">    </span><span class="k">pub</span><span class="w"> </span><span class="k">fn</span> <span class="nf">block_on</span><span class="o">&lt;</span><span class="n">F</span>: <span class="nc">Future</span><span class="o">&gt;</span><span class="p">(</span><span class="o">&amp;</span><span class="bp">self</span><span class="p">,</span><span class="w"> </span><span class="n">_future</span>: <span class="nc">F</span><span class="p">)</span><span class="w"> </span>-&gt; <span class="nc">F</span>::<span class="n">Output</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">        </span><span class="fm">unimplemented!</span><span class="p">()</span><span class="w"></span>
<span class="w">    </span><span class="p">}</span><span class="w"></span>
<span class="p">}</span><span class="w"></span>
<span class="k">pub</span><span class="w"> </span><span class="k">fn</span> <span class="nf">http</span><span class="o">&lt;</span><span class="n">F</span><span class="p">,</span><span class="w"> </span><span class="n">Fut</span><span class="o">&gt;</span><span class="p">(</span><span class="n">_func</span>: <span class="nc">F</span><span class="p">)</span><span class="w"></span>
<span class="k">where</span><span class="w"></span>
<span class="w">    </span><span class="n">F</span>: <span class="nb">Fn</span><span class="p">()</span><span class="w"> </span>-&gt; <span class="nc">Fut</span><span class="p">,</span><span class="w"></span>
<span class="w">    </span><span class="n">Fut</span>: <span class="nc">Future</span><span class="o">&lt;</span><span class="n">Output</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">()</span><span class="o">&gt;</span><span class="p">,</span><span class="w"></span>
<span class="p">{</span><span class="w"></span>
<span class="w">    </span><span class="kd">let</span><span class="w"> </span><span class="n">rt</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">Runtime</span><span class="w"> </span><span class="p">{};</span><span class="w"></span>
<span class="w">    </span><span class="kd">let</span><span class="w"> </span><span class="n">srv</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">rt</span><span class="p">.</span><span class="n">block_on</span><span class="p">(</span><span class="k">async</span><span class="w"> </span><span class="k">move</span><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="n">serve</span><span class="p">(</span><span class="k">move</span><span class="w"> </span><span class="o">||</span><span class="w"> </span><span class="k">async</span><span class="w"> </span><span class="k">move</span><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="fm">unimplemented!</span><span class="p">()</span><span class="w"> </span><span class="p">})</span><span class="w"> </span><span class="p">});</span><span class="w"></span>
<span class="w">    </span><span class="kd">let</span><span class="w"> </span><span class="n">_</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="o">||</span><span class="w"> </span><span class="n">rt</span><span class="p">.</span><span class="n">block_on</span><span class="p">(</span><span class="k">async</span><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="n">srv</span><span class="w"> </span><span class="p">});</span><span class="w"></span>
<span class="p">}</span><span class="w"></span>
<span class="k">pub</span><span class="w"> </span><span class="k">struct</span> <span class="nc">Server</span><span class="o">&lt;</span><span class="n">S</span><span class="o">&gt;</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">    </span><span class="n">_marker</span>: <span class="nc">std</span>::<span class="n">marker</span>::<span class="n">PhantomData</span><span class="o">&lt;</span><span class="n">S</span><span class="o">&gt;</span><span class="p">,</span><span class="w"></span>
<span class="p">}</span><span class="w"></span>
<span class="k">pub</span><span class="w"> </span><span class="k">fn</span> <span class="nf">serve</span><span class="o">&lt;</span><span class="n">S</span><span class="o">&gt;</span><span class="p">(</span><span class="n">_new_service</span>: <span class="nc">S</span><span class="p">)</span><span class="w"> </span>-&gt; <span class="nc">Server</span><span class="o">&lt;</span><span class="n">S</span><span class="o">&gt;</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">    </span><span class="fm">unimplemented!</span><span class="p">()</span><span class="w"></span>
<span class="p">}</span><span class="w"></span>
</code></pre></div>



<a name="244742686"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244742686" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244742686">(Jul 02 2021 at 18:43)</a>:</h4>
<div class="codehilite"><pre><span></span><code>rustc +nightly --edition=2018 --crate-type=lib --cap-lints=warn --force-warns rust-2021-compatibility -Zunstable-options main.rs
thread &#39;rustc&#39; panicked at &#39;index out of bounds: the len is 0 but the index is 21&#39;, /cargo/registry/src/github.com-1ecc6299db9ec823/ena-0.14.0/src/snapshot_vec.rs:199:10
</code></pre></div>
<p>during the <code>normalize_generic_arg_after_erasing_regions</code> query as expected</p>



<a name="244742993"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244742993" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244742993">(Jul 02 2021 at 18:46)</a>:</h4>
<p>does that still ICE with the check removed ?</p>



<a name="244743119"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244743119" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244743119">(Jul 02 2021 at 18:47)</a>:</h4>
<p>I need to rebuild, gimme sometime</p>



<a name="244743238"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244743238" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244743238">(Jul 02 2021 at 18:48)</a>:</h4>
<p>I thik it will still in this case</p>



<a name="244744923"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244744923" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244744923">(Jul 02 2021 at 19:02)</a>:</h4>
<p>I minimized the above from this reqwest/hyper/tokio example <a href="https://gist.github.com/lqd/7b94fa10d76ca2ba6c490685f5a3704e">https://gist.github.com/lqd/7b94fa10d76ca2ba6c490685f5a3704e</a> -- it passes a cargo check, and ICEs with <code>cargo fix --edition</code> (and of course ICEs as well under <code>RUSTFLAGS="--cap-lints=warn --force-warns rust-2021-compatibility -Zunstable-options" cargo +nightly check</code>)</p>



<a name="244746412"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244746412" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244746412">(Jul 02 2021 at 19:16)</a>:</h4>
<p>The bug is still there even with the check removed</p>



<a name="244752938"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244752938" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244752938">(Jul 02 2021 at 20:18)</a>:</h4>
<p>Hmm I'm starting to wonder if this has something to do with async closures</p>



<a name="244753355"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244753355" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244753355">(Jul 02 2021 at 20:23)</a>:</h4>
<div class="codehilite" data-code-language="Rust"><pre><span></span><code><span class="k">async</span><span class="w"> </span><span class="k">fn</span> <span class="nf">f</span><span class="p">()</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">    </span><span class="kd">let</span><span class="w"> </span><span class="n">x</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">String</span>::<span class="n">new</span><span class="p">();</span><span class="w"></span>

<span class="w">    </span><span class="kd">let</span><span class="w"> </span><span class="n">c</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">async</span><span class="w"> </span><span class="o">||</span><span class="w"> </span><span class="n">x</span><span class="p">;</span><span class="w"></span>
<span class="w">    </span><span class="kd">let</span><span class="w"> </span><span class="n">c</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="o">||</span><span class="w"> </span><span class="n">c</span><span class="p">;</span><span class="w"></span>
<span class="p">}</span><span class="w"></span>
</code></pre></div>



<a name="244753359"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244753359" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244753359">(Jul 02 2021 at 20:23)</a>:</h4>
<p>okay this triggers the bug</p>



<a name="244754775"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244754775" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244754775">(Jul 02 2021 at 20:36)</a>:</h4>
<p>What's interesting is that I dumpted out the types before calling <code>has_significant_dtors</code>/<code>needs_drop</code> (which calls normalizing regions)</p>
<div class="codehilite"><pre><span></span><code>DEBUG rustc_typeck::check::upvar drop_issue_ty=std::string::String
DEBUG rustc_typeck::check::upvar drop_issue_ty=std::string::String
DEBUG rustc_typeck::check::upvar drop_issue_ty=[closure@migrations_1.rs:6:13: 6:28]
</code></pre></div>



<a name="244754944"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244754944" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244754944">(Jul 02 2021 at 20:38)</a>:</h4>
<p>(deleted)</p>



<a name="244755436"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244755436" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244755436">(Jul 02 2021 at 20:44)</a>:</h4>
<p>Same with the example that <code>@lqd</code> shared, we have an async closure or something that contains a asyn closure that is being captured and we are trying to do a needs_drop check on it</p>



<a name="244755844"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244755844" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244755844">(Jul 02 2021 at 20:48)</a>:</h4>
<p>with -Zverbose the type  of the closure loos llike</p>
<div class="codehilite"><pre><span></span><code>drop_issue_ty=[f::{closure#0}::{closure#0} closure_kind_ty=i32 closure_sig_as_fn_ptr_ty=extern &quot;rust-call&quot; fn(()) -&gt; Opaque(DefId(2:12264 ~ core[1bbc]::future::from_generator::{opaque#0}), [[static f::{closure#0}::{closure#1} upvar_tys=(std::string::String) _#17t]]) upvar_tys=(std::string::String)]
</code></pre></div>



<a name="244827348"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244827348" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244827348">(Jul 03 2021 at 22:30)</a>:</h4>
<p><span class="user-mention" data-user-id="281950">@Aman Arora</span> I will take a look at this... can you send me some compact instructions for your preferred way to reproduce, or point me at the bugs in question</p>



<a name="244827349"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244827349" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244827349">(Jul 03 2021 at 22:30)</a>:</h4>
<p><span class="user-mention" data-user-id="281950">@Aman Arora</span> I will take a look at this... can you send me some compact instructions for your preferred way to reproduce, or point me at the bugs in question</p>



<a name="244827355"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244827355" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244827355">(Jul 03 2021 at 22:30)</a>:</h4>
<p>and we're just running on master, right?</p>



<a name="244827409"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244827409" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244827409">(Jul 03 2021 at 22:32)</a>:</h4>
<p>Yes I'm doing this on basically master</p>



<a name="244827412"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244827412" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244827412">(Jul 03 2021 at 22:32)</a>:</h4>
<div class="codehilite" data-code-language="Rust"><pre><span></span><code><span class="k">async</span><span class="w"> </span><span class="k">fn</span> <span class="nf">f</span><span class="p">()</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">    </span><span class="kd">let</span><span class="w"> </span><span class="n">x</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">String</span>::<span class="n">new</span><span class="p">();</span><span class="w"></span>

<span class="w">    </span><span class="kd">let</span><span class="w"> </span><span class="n">c</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">async</span><span class="w"> </span><span class="o">||</span><span class="w"> </span><span class="n">x</span><span class="p">;</span><span class="w"></span>
<span class="w">    </span><span class="kd">let</span><span class="w"> </span><span class="n">c</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="o">||</span><span class="w"> </span><span class="n">c</span><span class="p">;</span><span class="w"></span>
<span class="p">}</span><span class="w"></span>
</code></pre></div>



<a name="244827418"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244827418" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244827418">(Jul 03 2021 at 22:32)</a>:</h4>
<p>This triggers the bug if you enable edition lint and edition 2021</p>



<a name="244827467"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244827467" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244827467">(Jul 03 2021 at 22:33)</a>:</h4>
<p>-Zunstable-options --force-warns rust-2021-compatibility --edition 2021</p>



<a name="244827507"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244827507" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244827507">(Jul 03 2021 at 22:34)</a>:</h4>
<p>I don't have access to my laptop right now, so can't copy the exact command</p>



<a name="244827510"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244827510" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244827510">(Jul 03 2021 at 22:34)</a>:</h4>
<p>that's ok, thanks, perfect</p>



<a name="244827665"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244827665" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244827665">(Jul 03 2021 at 22:39)</a>:</h4>
<p>I think at least for this testcase you don't need to remove the is_drop check because it errors out before we even reach that check</p>



<a name="244833792"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244833792" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244833792">(Jul 04 2021 at 01:32)</a>:</h4>
<p>hmm, the problem seems to be <span class="user-mention" data-user-id="281950">@Aman Arora</span> that <code>normalize_erasing_regions</code> doesn't expect to see any inference variables... at least based on a few minutes investigating.</p>



<a name="244833876"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244833876" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244833876">(Jul 04 2021 at 01:35)</a>:</h4>
<p>Yes, but I dumped out the type being passed to</p>



<a name="244833976"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244833976" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244833976">(Jul 04 2021 at 01:38)</a>:</h4>
<p>with -Zverbose the type  of the closure loos llike</p>
<div class="codehilite"><pre><span></span><code>drop_issue_ty=[f::{closure#0}::{closure#0} closure_kind_ty=i32 closure_sig_as_fn_ptr_ty=extern &quot;rust-call&quot; fn(()) -&gt; Opaque(DefId(2:12264 ~ core[1bbc]::future::from_generator::{opaque#0}), [[static f::{closure#0}::{closure#1} upvar_tys=(std::string::String) _#17t]]) upvar_tys=(std::string::String)]
</code></pre></div>



<a name="244833981"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244833981" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244833981">(Jul 04 2021 at 01:38)</a>:</h4>
<p>Yea there is a _t something</p>



<a name="244834038"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244834038" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244834038">(Jul 04 2021 at 01:40)</a>:</h4>
<p>I think this from a but more complicated version of the test case I initially had</p>



<a name="244834052"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244834052" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244834052">(Jul 04 2021 at 01:41)</a>:</h4>
<p>I had added a debug! before the call to has_significant_dtor in the compute_2229_migrations_for_drop</p>



<a name="244834095"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244834095" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244834095">(Jul 04 2021 at 01:42)</a>:</h4>
<p>Because for an ty that we might look at that's the first place where we'd do the check  before doing any sort of precise analysis for drop migration</p>



<a name="244834346"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244834346" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244834346">(Jul 04 2021 at 01:50)</a>:</h4>
<p>yes, I don't think we expected the types to have unresolved inference variables at this stage; they usually don't, but it is possible</p>



<a name="244834352"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244834352" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244834352">(Jul 04 2021 at 01:50)</a>:</h4>
<p>I'm pondering -- the right fix is probably to canonicalize, or at least one fix</p>



<a name="244834354"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244834354" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244834354">(Jul 04 2021 at 01:50)</a>:</h4>
<p>certainly we could add an assertion :)</p>



<a name="244834355"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244834355" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244834355">(Jul 04 2021 at 01:50)</a>:</h4>
<p>but that would just ICE faster</p>



<a name="244834359"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244834359" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244834359">(Jul 04 2021 at 01:50)</a>:</h4>
<p>(we should do that, though)</p>



<a name="244834360"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244834360" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244834360">(Jul 04 2021 at 01:50)</a>:</h4>
<p>I also think it's an uninferred  region</p>



<a name="244834368"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244834368" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244834368">(Jul 04 2021 at 01:51)</a>:</h4>
<p>So Dhruv and Roxane had another error</p>



<a name="244834371"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244834371" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244834371">(Jul 04 2021 at 01:51)</a>:</h4>
<p>(e.g., an assertion in the <code>normalize_generic_arg_after_erasing_regions</code> query that there are no inference variables)</p>



<a name="244834372"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244834372" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244834372">(Jul 04 2021 at 01:51)</a>:</h4>
<p><a href="/user_uploads/4715/DQDA3grRNAIE6MzI98dV1r9m/received_521160225604112.webp">received_521160225604112.webp</a></p>
<div class="message_inline_image"><a href="/user_uploads/4715/DQDA3grRNAIE6MzI98dV1r9m/received_521160225604112.webp" title="received_521160225604112.webp"><img src="/user_uploads/4715/DQDA3grRNAIE6MzI98dV1r9m/received_521160225604112.webp"></a></div>



<a name="244834417"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244834417" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244834417">(Jul 04 2021 at 01:52)</a>:</h4>
<p>This shows an uninferred region, but this was cause by the is_drop_implemented check</p>



<a name="244834418"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244834418" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244834418">(Jul 04 2021 at 01:52)</a>:</h4>
<p>that looks like roughly the same bug</p>



<a name="244834423"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244834423" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244834423">(Jul 04 2021 at 01:52)</a>:</h4>
<p>Which weirdly enough on my build would stop because of snapshot vec idx of out bounds</p>



<a name="244834428"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244834428" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244834428">(Jul 04 2021 at 01:53)</a>:</h4>
<p>both bugs seem to be caused by not using canonicalization</p>



<a name="244834432"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244834432" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244834432">(Jul 04 2021 at 01:53)</a>:</h4>
<p>I see</p>



<a name="244834433"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244834433" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244834433">(Jul 04 2021 at 01:53)</a>:</h4>
<p><a href="https://rustc-dev-guide.rust-lang.org/traits/canonical-queries.html?highlight=canon#canonical-queries">https://rustc-dev-guide.rust-lang.org/traits/canonical-queries.html?highlight=canon#canonical-queries</a></p>



<a name="244834436"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244834436" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244834436">(Jul 04 2021 at 01:53)</a>:</h4>
<p>that kind of covers the concept</p>



<a name="244834453"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244834453" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244834453">(Jul 04 2021 at 01:54)</a>:</h4>
<p>anyway, the problem is that when you pass a type that may contain inference variables into a query and you make a fresh infcx, that's pretty broken</p>



<a name="244834492"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244834492" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244834492">(Jul 04 2021 at 01:54)</a>:</h4>
<p>canonicalizaiton is a technique for dealing with that</p>



<a name="244834494"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244834494" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244834494">(Jul 04 2021 at 01:54)</a>:</h4>
<p>I see</p>



<a name="244834495"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244834495" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244834495">(Jul 04 2021 at 01:54)</a>:</h4>
<p>at least the <code>type_implements_trait</code> seems to me to be a pre-existing bug</p>



<a name="244834503"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244834503" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244834503">(Jul 04 2021 at 01:55)</a>:</h4>
<p>since it gets called from other parts of typeck and I bet there are ways to break it</p>



<a name="244834521"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244834521" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244834521">(Jul 04 2021 at 01:55)</a>:</h4>
<p>the usual pattern is to have a method on the tcx that canonicalizes the query argument</p>



<a name="244834522"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244834522" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244834522">(Jul 04 2021 at 01:55)</a>:</h4>
<p>and then the actual query takes a canonicalized argument</p>



<a name="244834579"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244834579" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244834579">(Jul 04 2021 at 01:56)</a>:</h4>
<p>here is an example:</p>



<a name="244834581"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244834581" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244834581">(Jul 04 2021 at 01:56)</a>:</h4>
<p>Okay I see</p>



<a name="244834585"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244834585" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244834585">(Jul 04 2021 at 01:56)</a>:</h4>
<p>the <code>evaluate_obligation</code> method on <code>InferCtxt</code>: <a href="https://github.com/rust-lang/rust/blob/1297cb7f37bc37c6154c0fa4fcf23150c7a80548/compiler/rustc_trait_selection/src/traits/query/evaluate_obligation.rs#L61-L73">https://github.com/rust-lang/rust/blob/1297cb7f37bc37c6154c0fa4fcf23150c7a80548/compiler/rustc_trait_selection/src/traits/query/evaluate_obligation.rs#L61-L73</a></p>



<a name="244834587"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244834587" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244834587">(Jul 04 2021 at 01:56)</a>:</h4>
<p>oh, that didn't work</p>



<a name="244834589"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244834589" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244834589">(Jul 04 2021 at 01:56)</a>:</h4>
<p><a href="https://github.com/jam1garner/rust/blob/1297cb7f37bc37c6154c0fa4fcf23150c7a80548/compiler/rustc_trait_selection/src/traits/query/evaluate_obligation.rs#L61-L73">https://github.com/jam1garner/rust/blob/1297cb7f37bc37c6154c0fa4fcf23150c7a80548/compiler/rustc_trait_selection/src/traits/query/evaluate_obligation.rs#L61-L73</a></p>



<a name="244834593"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244834593" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244834593">(Jul 04 2021 at 01:57)</a>:</h4>
<p>not sure why my thing is giving me such random links</p>



<a name="244834596"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244834596" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244834596">(Jul 04 2021 at 01:57)</a>:</h4>
<div class="codehilite" data-code-language="Rust"><pre><span></span><code><span class="w">    </span><span class="sd">/// Evaluate a given predicate, capturing overflow and propagating it back.</span>
<span class="w">    </span><span class="k">fn</span> <span class="nf">evaluate_obligation</span><span class="p">(</span><span class="w"></span>
<span class="w">        </span><span class="o">&amp;</span><span class="bp">self</span><span class="p">,</span><span class="w"></span>
<span class="w">        </span><span class="n">obligation</span>: <span class="kp">&amp;</span><span class="nc">PredicateObligation</span><span class="o">&lt;'</span><span class="na">tcx</span><span class="o">&gt;</span><span class="p">,</span><span class="w"></span>
<span class="w">    </span><span class="p">)</span><span class="w"> </span>-&gt; <span class="nb">Result</span><span class="o">&lt;</span><span class="n">EvaluationResult</span><span class="p">,</span><span class="w"> </span><span class="n">OverflowError</span><span class="o">&gt;</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">        </span><span class="kd">let</span><span class="w"> </span><span class="k">mut</span><span class="w"> </span><span class="n">_orig_values</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">OriginalQueryValues</span>::<span class="n">default</span><span class="p">();</span><span class="w"></span>
<span class="w">        </span><span class="kd">let</span><span class="w"> </span><span class="n">c_pred</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="bp">self</span><span class="w"></span>
<span class="w">            </span><span class="p">.</span><span class="n">canonicalize_query</span><span class="p">(</span><span class="n">obligation</span><span class="p">.</span><span class="n">param_env</span><span class="p">.</span><span class="n">and</span><span class="p">(</span><span class="n">obligation</span><span class="p">.</span><span class="n">predicate</span><span class="p">),</span><span class="w"> </span><span class="o">&amp;</span><span class="k">mut</span><span class="w"> </span><span class="n">_orig_values</span><span class="p">);</span><span class="w"></span>
<span class="w">        </span><span class="c1">// Run canonical query. If overflow occurs, rerun from scratch but this time</span>
<span class="w">        </span><span class="c1">// in standard trait query mode so that overflow is handled appropriately</span>
<span class="w">        </span><span class="c1">// within `SelectionContext`.</span>
<span class="w">        </span><span class="bp">self</span><span class="p">.</span><span class="n">tcx</span><span class="p">.</span><span class="n">evaluate_obligation</span><span class="p">(</span><span class="n">c_pred</span><span class="p">)</span><span class="w"></span>
<span class="w">    </span><span class="p">}</span><span class="w"></span>
</code></pre></div>



<a name="244834601"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244834601" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244834601">(Jul 04 2021 at 01:57)</a>:</h4>
<p>see the call to <code>canonicalize_query</code></p>



<a name="244834605"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244834605" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244834605">(Jul 04 2021 at 01:57)</a>:</h4>
<p>Ah yes</p>



<a name="244834610"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244834610" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244834610">(Jul 04 2021 at 01:57)</a>:</h4>
<p>meanwhile the query definition:</p>



<a name="244834611"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244834611" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244834611">(Jul 04 2021 at 01:57)</a>:</h4>
<div class="codehilite" data-code-language="Rust"><pre><span></span><code><span class="k">fn</span> <span class="nf">evaluate_obligation</span><span class="o">&lt;'</span><span class="na">tcx</span><span class="o">&gt;</span><span class="p">(</span><span class="w"></span>
<span class="w">    </span><span class="n">tcx</span>: <span class="nc">TyCtxt</span><span class="o">&lt;'</span><span class="na">tcx</span><span class="o">&gt;</span><span class="p">,</span><span class="w"></span>
<span class="w">    </span><span class="n">canonical_goal</span>: <span class="nc">CanonicalPredicateGoal</span><span class="o">&lt;'</span><span class="na">tcx</span><span class="o">&gt;</span><span class="p">,</span><span class="w"></span>
<span class="p">)</span><span class="w"> </span>-&gt; <span class="nb">Result</span><span class="o">&lt;</span><span class="n">EvaluationResult</span><span class="p">,</span><span class="w"> </span><span class="n">OverflowError</span><span class="o">&gt;</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">    </span><span class="n">debug</span><span class="o">!</span><span class="p">(</span><span class="s">"evaluate_obligation(canonical_goal={:#?})"</span><span class="p">,</span><span class="w"> </span><span class="n">canonical_goal</span><span class="p">);</span><span class="w"></span>
<span class="w">    </span><span class="n">tcx</span><span class="p">.</span><span class="n">infer_ctxt</span><span class="p">().</span><span class="n">enter_with_canonical</span><span class="p">(</span><span class="w"></span>
<span class="w">        </span><span class="n">DUMMY_SP</span><span class="p">,</span><span class="w"></span>
<span class="w">        </span><span class="o">&amp;</span><span class="n">canonical_goal</span><span class="p">,</span><span class="w"></span>
<span class="w">        </span><span class="o">|</span><span class="k">ref</span><span class="w"> </span><span class="n">infcx</span><span class="p">,</span><span class="w"> </span><span class="n">goal</span><span class="p">,</span><span class="w"> </span><span class="n">_canonical_inference_vars</span><span class="o">|</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">            </span><span class="n">debug</span><span class="o">!</span><span class="p">(</span><span class="s">"evaluate_obligation: goal={:#?}"</span><span class="p">,</span><span class="w"> </span><span class="n">goal</span><span class="p">);</span><span class="w"></span>
<span class="w">            </span><span class="kd">let</span><span class="w"> </span><span class="n">ParamEnvAnd</span><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="n">param_env</span><span class="p">,</span><span class="w"> </span><span class="n">value</span>: <span class="nc">predicate</span><span class="w"> </span><span class="p">}</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">goal</span><span class="p">;</span><span class="w"></span>

<span class="w">            </span><span class="kd">let</span><span class="w"> </span><span class="k">mut</span><span class="w"> </span><span class="n">selcx</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">SelectionContext</span>::<span class="n">with_query_mode</span><span class="p">(</span><span class="o">&amp;</span><span class="n">infcx</span><span class="p">,</span><span class="w"> </span><span class="n">TraitQueryMode</span>::<span class="n">Canonical</span><span class="p">);</span><span class="w"></span>
<span class="w">            </span><span class="kd">let</span><span class="w"> </span><span class="n">obligation</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">Obligation</span>::<span class="n">new</span><span class="p">(</span><span class="n">ObligationCause</span>::<span class="n">dummy</span><span class="p">(),</span><span class="w"> </span><span class="n">param_env</span><span class="p">,</span><span class="w"> </span><span class="n">predicate</span><span class="p">);</span><span class="w"></span>

<span class="w">            </span><span class="n">selcx</span><span class="p">.</span><span class="n">evaluate_root_obligation</span><span class="p">(</span><span class="o">&amp;</span><span class="n">obligation</span><span class="p">)</span><span class="w"></span>
<span class="w">        </span><span class="p">},</span><span class="w"></span>
<span class="w">    </span><span class="p">)</span><span class="w"></span>
<span class="p">}</span><span class="w"></span>
</code></pre></div>



<a name="244834619"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244834619" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244834619">(Jul 04 2021 at 01:58)</a>:</h4>
<p>see it takes a <code>CanonicalPredicateGoal</code></p>



<a name="244834657"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244834657" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244834657">(Jul 04 2021 at 01:58)</a>:</h4>
<div class="codehilite" data-code-language="Rust"><pre><span></span><code><span class="k">pub</span><span class="w"> </span><span class="k">type</span> <span class="nc">CanonicalPredicateGoal</span><span class="o">&lt;'</span><span class="na">tcx</span><span class="o">&gt;</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">Canonical</span><span class="o">&lt;'</span><span class="na">tcx</span><span class="p">,</span><span class="w"> </span><span class="n">ty</span>::<span class="n">ParamEnvAnd</span><span class="o">&lt;'</span><span class="na">tcx</span><span class="p">,</span><span class="w"> </span><span class="n">ty</span>::<span class="n">Predicate</span><span class="o">&lt;'</span><span class="na">tcx</span><span class="o">&gt;&gt;&gt;</span><span class="p">;</span><span class="w"></span>
</code></pre></div>



<a name="244834662"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244834662" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244834662">(Jul 04 2021 at 01:58)</a>:</h4>
<p>Okay yes</p>



<a name="244834664"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244834664" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244834664">(Jul 04 2021 at 01:58)</a>:</h4>
<p>basically, with a canonical goal, any unknown inference variables are detected and given a canonical numbering (in the order that they appear)</p>



<a name="244834668"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244834668" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244834668">(Jul 04 2021 at 01:58)</a>:</h4>
<p>then when you can <code>enter_with_canonical</code>, it will create corresponding variables in the new inference context</p>



<a name="244834679"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244834679" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244834679">(Jul 04 2021 at 01:59)</a>:</h4>
<p>Okay</p>



<a name="244834680"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244834680" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244834680">(Jul 04 2021 at 01:59)</a>:</h4>
<p>I am debating; I guess the fix is to apply the same pattern</p>



<a name="244834682"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244834682" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244834682">(Jul 04 2021 at 01:59)</a>:</h4>
<p>I dont know whether this will be a perf hit, I'd try it first to see</p>



<a name="244834686"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244834686" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244834686">(Jul 04 2021 at 01:59)</a>:</h4>
<p>hopefully not and/or we can optimize</p>



<a name="244834733"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244834733" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244834733">(Jul 04 2021 at 02:00)</a>:</h4>
<p>Do we care about this outside of migrations?</p>



<a name="244834741"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244834741" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244834741">(Jul 04 2021 at 02:00)</a>:</h4>
<p>I think canonicalization is pretty cheap if it doesn't need to be done</p>



<a name="244834748"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244834748" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244834748">(Jul 04 2021 at 02:00)</a>:</h4>
<p>Like from our respective</p>



<a name="244834753"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244834753" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244834753">(Jul 04 2021 at 02:00)</a>:</h4>
<p><span class="user-mention silent" data-user-id="281950">Aman Arora</span> <a href="#narrow/stream/189812-t-compiler.2Fwg-rfc-2229/topic/migration.20bug/near/244834733">said</a>:</p>
<blockquote>
<p>Do we care about this outside of migrations?</p>
</blockquote>
<p>well, the code is just kind of wrong</p>



<a name="244834776"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244834776" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244834776">(Jul 04 2021 at 02:00)</a>:</h4>
<p>we really shouldn't have queries that take a raw, non-canonicalized <code>Ty&lt;'tcx&gt;</code> -- or else they should have assertions that there are no inference variables</p>



<a name="244834778"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244834778" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244834778">(Jul 04 2021 at 02:01)</a>:</h4>
<p><span class="user-mention silent" data-user-id="116009">nikomatsakis</span> <a href="#narrow/stream/189812-t-compiler.2Fwg-rfc-2229/topic/migration.20bug/near/244834741">said</a>:</p>
<blockquote>
<p>I think canonicalization is pretty cheap if it doesn't need to be done</p>
</blockquote>
<p>(yes, there is a fast path)</p>



<a name="244834788"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244834788" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244834788">(Jul 04 2021 at 02:01)</a>:</h4>
<p>not sure how clear it is to you what I am proposing to do</p>



<a name="244834790"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244834790" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244834790">(Jul 04 2021 at 02:01)</a>:</h4>
<p>I could potentially prep a PR for this in the morning</p>



<a name="244834798"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244834798" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244834798">(Jul 04 2021 at 02:01)</a>:</h4>
<p>Hmm needs_drop doesn't seem to have canocalization from what I remember (I'm still away from my laptop, can't check GitHub easily)</p>



<a name="244834853"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244834853" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244834853">(Jul 04 2021 at 02:03)</a>:</h4>
<p>If it's easier for you to do it that works, I'd still like to understand to some degree what you're proposing</p>



<a name="244834905"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244834905" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244834905">(Jul 04 2021 at 02:04)</a>:</h4>
<p>My understanding so far is to add a layer in the middle that would canocalize the type argument we pass</p>



<a name="244834910"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244834910" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244834910">(Jul 04 2021 at 02:04)</a>:</h4>
<p><span class="user-mention silent" data-user-id="281950">Aman Arora</span> <a href="#narrow/stream/189812-t-compiler.2Fwg-rfc-2229/topic/migration.20bug/near/244834798">said</a>:</p>
<blockquote>
<p>Hmm needs_drop doesn't seem to have canocalization from what I remember (I'm still away from my laptop, can't check GitHub easily)</p>
</blockquote>
<p>it doesn't</p>



<a name="244834914"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244834914" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244834914">(Jul 04 2021 at 02:04)</a>:</h4>
<p>I think it is not meant to be called from type check</p>



<a name="244834918"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244834918" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244834918">(Jul 04 2021 at 02:04)</a>:</h4>
<p>It should have an assertion</p>



<a name="244834920"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244834920" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244834920">(Jul 04 2021 at 02:04)</a>:</h4>
<p>But really I think the problem is not needs-drop</p>



<a name="244834947"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244834947" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244834947">(Jul 04 2021 at 02:05)</a>:</h4>
<p>It's because <code>needs_drop</code> calls</p>
<div class="codehilite" data-code-language="Rust"><pre><span></span><code><span class="w">                </span><span class="kd">let</span><span class="w"> </span><span class="n">erased</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">tcx</span><span class="p">.</span><span class="n">normalize_erasing_regions</span><span class="p">(</span><span class="n">param_env</span><span class="p">,</span><span class="w"> </span><span class="n">query_ty</span><span class="p">);</span><span class="w"></span>
</code></pre></div>



<a name="244834992"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244834992" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244834992">(Jul 04 2021 at 02:06)</a>:</h4>
<p>and <em>that</em> code (eventually) invokes a query (<code>normalize_generic_arg_after_erasing_regions</code>)</p>



<a name="244834996"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244834996" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244834996">(Jul 04 2021 at 02:06)</a>:</h4>
<p>Ah right and that doesn't implement canocalization?</p>



<a name="244835001"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244835001" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244835001">(Jul 04 2021 at 02:06)</a>:</h4>
<p>right</p>



<a name="244835005"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244835005" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244835005">(Jul 04 2021 at 02:06)</a>:</h4>
<p>I think we just need to modify this folder:</p>



<a name="244835006"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244835006" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244835006">(Jul 04 2021 at 02:06)</a>:</h4>
<div class="codehilite" data-code-language="Rust"><pre><span></span><code><span class="k">struct</span> <span class="nc">NormalizeAfterErasingRegionsFolder</span><span class="o">&lt;'</span><span class="na">tcx</span><span class="o">&gt;</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">    </span><span class="n">tcx</span>: <span class="nc">TyCtxt</span><span class="o">&lt;'</span><span class="na">tcx</span><span class="o">&gt;</span><span class="p">,</span><span class="w"></span>
<span class="w">    </span><span class="n">param_env</span>: <span class="nc">ty</span>::<span class="n">ParamEnv</span><span class="o">&lt;'</span><span class="na">tcx</span><span class="o">&gt;</span><span class="p">,</span><span class="w"></span>
<span class="p">}</span><span class="w"></span>

<span class="k">impl</span><span class="w"> </span><span class="n">TypeFolder</span><span class="o">&lt;'</span><span class="na">tcx</span><span class="o">&gt;</span><span class="w"> </span><span class="k">for</span><span class="w"> </span><span class="n">NormalizeAfterErasingRegionsFolder</span><span class="o">&lt;'</span><span class="na">tcx</span><span class="o">&gt;</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">    </span><span class="k">fn</span> <span class="nf">tcx</span><span class="p">(</span><span class="o">&amp;</span><span class="bp">self</span><span class="p">)</span><span class="w"> </span>-&gt; <span class="nc">TyCtxt</span><span class="o">&lt;'</span><span class="na">tcx</span><span class="o">&gt;</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">        </span><span class="bp">self</span><span class="p">.</span><span class="n">tcx</span><span class="w"></span>
<span class="w">    </span><span class="p">}</span><span class="w"></span>

<span class="w">    </span><span class="k">fn</span> <span class="nf">fold_ty</span><span class="p">(</span><span class="o">&amp;</span><span class="k">mut</span><span class="w"> </span><span class="bp">self</span><span class="p">,</span><span class="w"> </span><span class="n">ty</span>: <span class="nc">Ty</span><span class="o">&lt;'</span><span class="na">tcx</span><span class="o">&gt;</span><span class="p">)</span><span class="w"> </span>-&gt; <span class="nc">Ty</span><span class="o">&lt;'</span><span class="na">tcx</span><span class="o">&gt;</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">        </span><span class="kd">let</span><span class="w"> </span><span class="n">arg</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="bp">self</span><span class="p">.</span><span class="n">param_env</span><span class="p">.</span><span class="n">and</span><span class="p">(</span><span class="n">ty</span><span class="p">.</span><span class="n">into</span><span class="p">());</span><span class="w"></span>
<span class="w">        </span><span class="bp">self</span><span class="p">.</span><span class="n">tcx</span><span class="p">.</span><span class="n">normalize_generic_arg_after_erasing_regions</span><span class="p">(</span><span class="n">arg</span><span class="p">).</span><span class="n">expect_ty</span><span class="p">()</span><span class="w"></span>
<span class="w">    </span><span class="p">}</span><span class="w"></span>

<span class="w">    </span><span class="k">fn</span> <span class="nf">fold_const</span><span class="p">(</span><span class="o">&amp;</span><span class="k">mut</span><span class="w"> </span><span class="bp">self</span><span class="p">,</span><span class="w"> </span><span class="n">c</span>: <span class="kp">&amp;</span><span class="o">'</span><span class="na">tcx</span> <span class="nc">ty</span>::<span class="n">Const</span><span class="o">&lt;'</span><span class="na">tcx</span><span class="o">&gt;</span><span class="p">)</span><span class="w"> </span>-&gt; <span class="kp">&amp;</span><span class="o">'</span><span class="na">tcx</span> <span class="nc">ty</span>::<span class="n">Const</span><span class="o">&lt;'</span><span class="na">tcx</span><span class="o">&gt;</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">        </span><span class="kd">let</span><span class="w"> </span><span class="n">arg</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="bp">self</span><span class="p">.</span><span class="n">param_env</span><span class="p">.</span><span class="n">and</span><span class="p">(</span><span class="n">c</span><span class="p">.</span><span class="n">into</span><span class="p">());</span><span class="w"></span>
<span class="w">        </span><span class="bp">self</span><span class="p">.</span><span class="n">tcx</span><span class="p">.</span><span class="n">normalize_generic_arg_after_erasing_regions</span><span class="p">(</span><span class="n">arg</span><span class="p">).</span><span class="n">expect_const</span><span class="p">()</span><span class="w"></span>
<span class="w">    </span><span class="p">}</span><span class="w"></span>

<span class="w">    </span><span class="cp">#[inline]</span><span class="w"></span>
<span class="w">    </span><span class="k">fn</span> <span class="nf">fold_mir_const</span><span class="p">(</span><span class="o">&amp;</span><span class="k">mut</span><span class="w"> </span><span class="bp">self</span><span class="p">,</span><span class="w"> </span><span class="n">c</span>: <span class="nc">mir</span>::<span class="n">ConstantKind</span><span class="o">&lt;'</span><span class="na">tcx</span><span class="o">&gt;</span><span class="p">)</span><span class="w"> </span>-&gt; <span class="nc">mir</span>::<span class="n">ConstantKind</span><span class="o">&lt;'</span><span class="na">tcx</span><span class="o">&gt;</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">        </span><span class="kd">let</span><span class="w"> </span><span class="n">arg</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="bp">self</span><span class="p">.</span><span class="n">param_env</span><span class="p">.</span><span class="n">and</span><span class="p">(</span><span class="n">c</span><span class="p">);</span><span class="w"></span>
<span class="w">        </span><span class="bp">self</span><span class="p">.</span><span class="n">tcx</span><span class="p">.</span><span class="n">normalize_mir_const_after_erasing_regions</span><span class="p">(</span><span class="n">arg</span><span class="p">)</span><span class="w"></span>
<span class="w">    </span><span class="p">}</span><span class="w"></span>
<span class="p">}</span><span class="w"></span>
</code></pre></div>



<a name="244835010"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244835010" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244835010">(Jul 04 2021 at 02:06)</a>:</h4>
<p>maybe i'll take a stab at it right now</p>



<a name="244835023"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244835023" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244835023">(Jul 04 2021 at 02:07)</a>:</h4>
<p>Okay thank you</p>



<a name="244835026"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244835026" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244835026">(Jul 04 2021 at 02:07)</a>:</h4>
<p>I'd rather you do it (as you say, good to learn), I just want to make sure it gets done, and I don't want to pressure you all with deadlines :)</p>



<a name="244835036"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244835036" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244835036">(Jul 04 2021 at 02:07)</a>:</h4>
<p>I'll see if I can do it in a few minutes</p>



<a name="244835037"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244835037" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244835037">(Jul 04 2021 at 02:07)</a>:</h4>
<p>I can take a stab at it tomorrow</p>



<a name="244835438"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244835438" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244835438">(Jul 04 2021 at 02:19)</a>:</h4>
<p><span class="user-mention" data-user-id="281950">@Aman Arora</span> ok, I am going to give up for tonight; it's a bit more annoying than I thought. The problem is that the <code>has_significant_drop</code> method is currently defined on <code>TyCtxt</code>, but to invoke canonicalization, it needs to have access to an inference context -- really the problem is that the normalization code does. Probably the easiest fix to <em>this particular</em> bug is to move that method to <code>FnCtxt</code> and to have it use some of the <code>FnCtxt</code> methods to do normalization.</p>



<a name="244835446"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244835446" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244835446">(Jul 04 2021 at 02:19)</a>:</h4>
<p>The same may be true for <code>type_implements_trait</code> as well</p>



<a name="244835451"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244835451" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244835451">(Jul 04 2021 at 02:19)</a>:</h4>
<p>(deleted)</p>



<a name="244835495"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244835495" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244835495">(Jul 04 2021 at 02:20)</a>:</h4>
<p>Happy to discuss more tomorrow</p>



<a name="244836215"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244836215" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244836215">(Jul 04 2021 at 02:40)</a>:</h4>
<div class="codehilite" data-code-language="Rust"><pre><span></span><code><span class="w">    </span><span class="k">pub</span><span class="w"> </span><span class="k">fn</span> <span class="nf">has_significant_drop</span><span class="p">(</span><span class="w"></span>
<span class="w">        </span><span class="o">&amp;'</span><span class="na">tcx</span><span class="w"> </span><span class="bp">self</span><span class="p">,</span><span class="w"></span>
<span class="w">        </span><span class="n">tcx</span>: <span class="nc">TyCtxt</span><span class="o">&lt;'</span><span class="na">tcx</span><span class="o">&gt;</span><span class="p">,</span><span class="w"></span>
<span class="w">        </span><span class="n">param_env</span>: <span class="nc">ty</span>::<span class="n">ParamEnv</span><span class="o">&lt;'</span><span class="na">tcx</span><span class="o">&gt;</span><span class="p">,</span><span class="w"></span>
<span class="w">    </span><span class="p">)</span><span class="w"> </span>-&gt; <span class="kt">bool</span> <span class="p">{</span><span class="w"></span>
<span class="w">        </span><span class="c1">// Avoid querying in simple cases.</span>
<span class="w">        </span><span class="k">match</span><span class="w"> </span><span class="n">needs_drop_components</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span><span class="w"> </span><span class="o">&amp;</span><span class="n">tcx</span><span class="p">.</span><span class="n">data_layout</span><span class="p">)</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">            </span><span class="nb">Err</span><span class="p">(</span><span class="n">AlwaysRequiresDrop</span><span class="p">)</span><span class="w"> </span><span class="o">=&gt;</span><span class="w"> </span><span class="kc">true</span><span class="p">,</span><span class="w"></span>
<span class="w">            </span><span class="nb">Ok</span><span class="p">(</span><span class="n">components</span><span class="p">)</span><span class="w"> </span><span class="o">=&gt;</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">                </span><span class="kd">let</span><span class="w"> </span><span class="n">query_ty</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">match</span><span class="w"> </span><span class="o">*</span><span class="n">components</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">                    </span><span class="p">[]</span><span class="w"> </span><span class="o">=&gt;</span><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="kc">false</span><span class="p">,</span><span class="w"></span>
<span class="w">                    </span><span class="c1">// If we've got a single component, call the query with that</span>
<span class="w">                    </span><span class="c1">// to increase the chance that we hit the query cache.</span>
<span class="w">                    </span><span class="p">[</span><span class="n">component_ty</span><span class="p">]</span><span class="w"> </span><span class="o">=&gt;</span><span class="w"> </span><span class="n">component_ty</span><span class="p">,</span><span class="w"></span>
<span class="w">                    </span><span class="n">_</span><span class="w"> </span><span class="o">=&gt;</span><span class="w"> </span><span class="bp">self</span><span class="p">,</span><span class="w"></span>
<span class="w">                </span><span class="p">};</span><span class="w"></span>
<span class="w">                </span><span class="c1">// This doesn't depend on regions, so try to minimize distinct</span>
<span class="w">                </span><span class="c1">// query keys used.</span>
<span class="w">                </span><span class="kd">let</span><span class="w"> </span><span class="n">erased</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">tcx</span><span class="p">.</span><span class="n">normalize_erasing_regions</span><span class="p">(</span><span class="n">param_env</span><span class="p">,</span><span class="w"> </span><span class="n">query_ty</span><span class="p">);</span><span class="w"></span>
<span class="w">                </span><span class="n">tcx</span><span class="p">.</span><span class="n">has_significant_drop_raw</span><span class="p">(</span><span class="n">param_env</span><span class="p">.</span><span class="n">and</span><span class="p">(</span><span class="n">erased</span><span class="p">))</span><span class="w"></span>
<span class="w">            </span><span class="p">}</span><span class="w"></span>
<span class="w">        </span><span class="p">}</span><span class="w"></span>
<span class="w">    </span><span class="p">}</span><span class="w"></span>
</code></pre></div>
<p>So we have two queries here:</p>
<ul>
<li>normalize_erasing_regions</li>
<li>has_significant_drop_raw</li>
</ul>
<p>I'm assuming we want to have both these take a canocalized parameter?</p>



<a name="244852604"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244852604" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244852604">(Jul 04 2021 at 10:24)</a>:</h4>
<p>well, it depends</p>



<a name="244852617"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244852617" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244852617">(Jul 04 2021 at 10:24)</a>:</h4>
<p>also, we only invoke <code>has_significant_drop</code> when the lint is enabled, right?</p>



<a name="244852706"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244852706" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244852706">(Jul 04 2021 at 10:27)</a>:</h4>
<p><span class="user-mention silent" data-user-id="116009">nikomatsakis</span> <a href="#narrow/stream/189812-t-compiler.2Fwg-rfc-2229/topic/migration.20bug/near/244852604">said</a>:</p>
<blockquote>
<p>well, it depends</p>
</blockquote>
<p>in principle yes, but if <code>has_significant_drop_raw</code> never creates an inference context, it may not matter</p>



<a name="244852769"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244852769" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244852769">(Jul 04 2021 at 10:28)</a>:</h4>
<p>although I see that it does invoke (e.g.) <code>normalize_erasing_regions</code></p>



<a name="244852786"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244852786" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244852786">(Jul 04 2021 at 10:29)</a>:</h4>
<p>I am wondering-- at the time that upvar analysis runs, we expect most types to be inferred</p>



<a name="244852901"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244852901" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244852901">(Jul 04 2021 at 10:32)</a>:</h4>
<p>I see that issue <a href="https://github.com/rust-lang/rust/issues/84841">#84841</a> comes from <code>type_implements_trait</code> being invoked by some of the suggestion-generated code</p>



<a name="244852976"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244852976" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244852976">(Jul 04 2021 at 10:35)</a>:</h4>
<p>also this comment is just wrong</p>



<a name="244852978"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244852978" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244852978">(Jul 04 2021 at 10:35)</a>:</h4>
<div class="codehilite" data-code-language="Rust"><pre><span></span><code><span class="sd">///</span>
<span class="sd">/// NOTE: Always return `false` for a type which needs inference.</span>
</code></pre></div>



<a name="244852979"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244852979" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244852979">(Jul 04 2021 at 10:35)</a>:</h4>
<p>(from that function)</p>



<a name="244853040"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244853040" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244853040">(Jul 04 2021 at 10:36)</a>:</h4>
<p>heh, lol, most of the callers have this:</p>



<a name="244853045"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244853045" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244853045">(Jul 04 2021 at 10:36)</a>:</h4>
<div class="codehilite"><pre><span></span><code>if ty.has_infer_types() { return }
</code></pre></div>



<a name="244853048"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244853048" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244853048">(Jul 04 2021 at 10:36)</a>:</h4>
<p>which is just working around the actual bug</p>



<a name="244853101"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244853101" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244853101">(Jul 04 2021 at 10:38)</a>:</h4>
<p>but that's not good enough</p>



<a name="244853494"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244853494" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244853494">(Jul 04 2021 at 10:49)</a>:</h4>
<p>(<code>needs_infer</code> would be more correct)</p>



<a name="244853805"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244853805" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244853805">(Jul 04 2021 at 10:58)</a>:</h4>
<p>the only annoying one is going to be clippy</p>



<a name="244853812"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244853812" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244853812">(Jul 04 2021 at 10:58)</a>:</h4>
<p>though at the time clippy reallys there really ought not to be any inference going on</p>



<a name="244853821"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244853821" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244853821">(Jul 04 2021 at 10:59)</a>:</h4>
<p>I am wondering if we can do a quick workaround to this bug by introducing <code>needs_infer</code> checks and bailing out if that is true</p>



<a name="244853822"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244853822" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244853822">(Jul 04 2021 at 10:59)</a>:</h4>
<p>e.g., you could assume that it has a significant destructor in that case</p>



<a name="244853827"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244853827" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244853827">(Jul 04 2021 at 10:59)</a>:</h4>
<p>then we could file an issue and do the refactoring properly</p>



<a name="244853879"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244853879" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244853879">(Jul 04 2021 at 11:00)</a>:</h4>
<p>it's going to produce some false positives, but probably not too bad</p>



<a name="244853883"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244853883" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244853883">(Jul 04 2021 at 11:00)</a>:</h4>
<p>(famous last words)</p>



<a name="244853916"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244853916" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244853916">(Jul 04 2021 at 11:01)</a>:</h4>
<p>(cc <span class="user-mention" data-user-id="116883">@tmandry</span> we definitely identified the root cause of <a href="https://github.com/rust-lang/rust/issues/84841">#84841</a>)</p>



<a name="244865220"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244865220" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244865220">(Jul 04 2021 at 15:45)</a>:</h4>
<p>opened <a href="https://github.com/rust-lang/rust/pull/86866">https://github.com/rust-lang/rust/pull/86866</a></p>



<a name="244865224"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244865224" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244865224">(Jul 04 2021 at 15:45)</a>:</h4>
<p><span class="user-mention" data-user-id="281950">@Aman Arora</span> <span aria-label="point up" class="emoji emoji-1f446" role="img" title="point up">:point_up:</span></p>



<a name="244865263"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244865263" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244865263">(Jul 04 2021 at 15:46)</a>:</h4>
<p>I opted for the repro that <span class="user-mention" data-user-id="116113">@lqd</span> found because it didn't involve async closures.</p>



<a name="244868860"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244868860" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244868860">(Jul 04 2021 at 17:22)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span>  I'm curious if you tried this on tokio? Like running cargo fix with your build of the compiler</p>



<a name="244868869"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244868869" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244868869">(Jul 04 2021 at 17:23)</a>:</h4>
<p>Just to make sure there aren't any other issues that got masked by the missing cancolization</p>



<a name="244871862"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244871862" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244871862">(Jul 04 2021 at 18:43)</a>:</h4>
<p>so, this PR definitely fixes migration on reqwest. It also fixes tokio on the specific commit rylev tested.</p>



<a name="244871870"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244871870" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244871870">(Jul 04 2021 at 18:43)</a>:</h4>
<p>Thanks great, thanks!</p>



<a name="244871871"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244871871" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244871871">(Jul 04 2021 at 18:43)</a>:</h4>
<p>at first I tried on master and I think they must have compile errors in some tests or something</p>



<a name="244871916"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244871916" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244871916">(Jul 04 2021 at 18:44)</a>:</h4>
<p>I see</p>



<a name="244871919"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244871919" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244871919">(Jul 04 2021 at 18:44)</a>:</h4>
<p>so between this error, maybe some incremental shenanigans, and so on: I also got a weird ICE at some point <code>error: internal compiler error: compiler/rustc_middle/src/ich/impls_ty.rs:94:17: StableHasher: unexpected region '_#3r</code></p>



<a name="244871938"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244871938" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244871938">(Jul 04 2021 at 18:45)</a>:</h4>
<p>That's possibly an actual issue</p>



<a name="244871954"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244871954" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244871954">(Jul 04 2021 at 18:45)</a>:</h4>
<p>but on the given commit with everything clean it did migrate successfully.</p>



<a name="244871959"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244871959" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244871959">(Jul 04 2021 at 18:45)</a>:</h4>
<p>That's the one that gets fixed by removing the check i had mentioned ont eh PR</p>



<a name="244871963"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244871963" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244871963">(Jul 04 2021 at 18:45)</a>:</h4>
<p>Do you have a traceback?</p>



<a name="244871964"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244871964" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244871964">(Jul 04 2021 at 18:45)</a>:</h4>
<p>interesting yeah</p>



<a name="244871986"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244871986" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244871986">(Jul 04 2021 at 18:46)</a>:</h4>
<p>unfortunately no, I was trying to get a full backtrace and then it didn't reappear after cleaning</p>



<a name="244872016"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244872016" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244872016">(Jul 04 2021 at 18:46)</a>:</h4>
<p>I'll try to get a repro and trace on master</p>



<a name="244872025"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244872025" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244872025">(Jul 04 2021 at 18:46)</a>:</h4>
<p>if it doesn't on master after cargo clean that should be fine then, at least from prespective of migrations</p>



<a name="244872042"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244872042" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244872042">(Jul 04 2021 at 18:47)</a>:</h4>
<p>no promises about minimising if there's indeed an issue though, tokio/reqwest (or in general most multi-crate projects) are tough to reduce, just the reqwest case took me hours <span aria-label="sweat" class="emoji emoji-1f613" role="img" title="sweat">:sweat:</span></p>



<a name="244872049"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244872049" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244872049">(Jul 04 2021 at 18:47)</a>:</h4>
<p>fair enough, thank you for trying ^^</p>



<a name="244872088"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244872088" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244872088">(Jul 04 2021 at 18:48)</a>:</h4>
<p>I'll investigate this on master where the compile error could be having unfortunate consequences</p>



<a name="244872098"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244872098" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244872098">(Jul 04 2021 at 18:48)</a>:</h4>
<p>at least try and get a backtrace otherwise we're not going to be able to do much</p>



<a name="244872109"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244872109" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244872109">(Jul 04 2021 at 18:49)</a>:</h4>
<p>(it was typecking <a href="https://github.com/rust-lang/rust/issues/0">#0</a> [typeck] type-checking <code>task::local::&lt;impl at tokio/src/task/local.rs:625:1: 654:2&gt;::poll</code> )</p>



<a name="244872415"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244872415" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244872415">(Jul 04 2021 at 18:57)</a>:</h4>
<p>I mention the incremental thing because there are open bugs about queries, and this seems related, rather than solely about migration, as if the <code>type_implements_trait</code> query had incr issues (maybe because of the PR)</p>



<a name="244872432"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244872432" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244872432">(Jul 04 2021 at 18:58)</a>:</h4>
<p>I'm aware of that but it also feels similar to <br>
<a href="/user_uploads/4715/sbhEWU2u6rm2i6KZTb6Ui8iY/image.png">image.png</a></p>
<div class="message_inline_image"><a href="/user_uploads/4715/sbhEWU2u6rm2i6KZTb6Ui8iY/image.png" title="image.png"><img src="/user_uploads/4715/sbhEWU2u6rm2i6KZTb6Ui8iY/image.png"></a></div>



<a name="244872472"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244872472" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244872472">(Jul 04 2021 at 18:58)</a>:</h4>
<p>If it doesn't happen on master then it's probably an incremental issue</p>



<a name="244872473"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244872473" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244872473">(Jul 04 2021 at 18:58)</a>:</h4>
<p>trace on tokio master with incr turned on <a href="https://gist.github.com/lqd/007dec5503524d0108ee36299e82ceb4">https://gist.github.com/lqd/007dec5503524d0108ee36299e82ceb4</a></p>



<a name="244872485"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244872485" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244872485">(Jul 04 2021 at 18:59)</a>:</h4>
<div class="codehilite" data-code-language="Rust"><pre><span></span><code><span class="mi">38</span>:     <span class="mh">0x7f44e3664612</span><span class="w"> </span><span class="o">-</span><span class="w"> </span><span class="n">rustc_query_system</span>::<span class="n">query</span>::<span class="n">plumbing</span>::<span class="n">get_query</span>::<span class="n">h94ab4effa5701216</span><span class="w"></span>
<span class="w">                               </span><span class="n">at</span><span class="w"> </span><span class="o">/</span><span class="n">mnt</span><span class="o">/</span><span class="n">d</span><span class="o">/</span><span class="n">work</span><span class="o">/</span><span class="n">rust</span><span class="o">/</span><span class="n">lqd</span><span class="o">-</span><span class="n">rust</span><span class="o">/</span><span class="n">compiler</span><span class="o">/</span><span class="n">rustc_query_system</span><span class="o">/</span><span class="n">src</span><span class="o">/</span><span class="n">query</span><span class="o">/</span><span class="n">plumbing</span><span class="p">.</span><span class="n">rs</span>:<span class="mi">828</span>:<span class="mi">17</span><span class="w"></span>
<span class="w">  </span><span class="mi">39</span>:     <span class="mh">0x7f44e379ff34</span><span class="w"> </span><span class="o">-</span><span class="w"> </span><span class="o">&lt;</span><span class="n">rustc_query_impl</span>::<span class="n">Queries</span><span class="w"> </span><span class="k">as</span><span class="w"> </span><span class="n">rustc_middle</span>::<span class="n">ty</span>::<span class="n">query</span>::<span class="n">QueryEngine</span><span class="o">&gt;</span>::<span class="n">type_implements_trait</span>::<span class="n">hfab150c4dff32811</span><span class="w"></span>
<span class="w">                               </span><span class="n">at</span><span class="w"> </span><span class="o">/</span><span class="n">mnt</span><span class="o">/</span><span class="n">d</span><span class="o">/</span><span class="n">work</span><span class="o">/</span><span class="n">rust</span><span class="o">/</span><span class="n">lqd</span><span class="o">-</span><span class="n">rust</span><span class="o">/</span><span class="n">compiler</span><span class="o">/</span><span class="n">rustc_query_impl</span><span class="o">/</span><span class="n">src</span><span class="o">/</span><span class="n">plumbing</span><span class="p">.</span><span class="n">rs</span>:<span class="mi">552</span>:<span class="mi">17</span><span class="w"></span>
<span class="w">  </span><span class="mi">40</span>:     <span class="mh">0x7f44e2f4579d</span><span class="w"> </span><span class="o">-</span><span class="w"> </span><span class="n">rustc_middle</span>::<span class="n">ty</span>::<span class="n">query</span>::<span class="n">TyCtxtAt</span>::<span class="n">type_implements_trait</span>::<span class="n">h3f7e1f2c3bdb1bab</span><span class="w"></span>
<span class="w">                               </span><span class="n">at</span><span class="w"> </span><span class="o">/</span><span class="n">mnt</span><span class="o">/</span><span class="n">d</span><span class="o">/</span><span class="n">work</span><span class="o">/</span><span class="n">rust</span><span class="o">/</span><span class="n">lqd</span><span class="o">-</span><span class="n">rust</span><span class="o">/</span><span class="n">compiler</span><span class="o">/</span><span class="n">rustc_middle</span><span class="o">/</span><span class="n">src</span><span class="o">/</span><span class="n">ty</span><span class="o">/</span><span class="n">query</span><span class="o">/</span><span class="k">mod</span><span class="p">.</span><span class="n">rs</span>:<span class="mi">207</span>:<span class="mi">17</span><span class="w"></span>
<span class="w">  </span><span class="mi">41</span>:     <span class="mh">0x7f44e2f4579d</span><span class="w"> </span><span class="o">-</span><span class="w"> </span><span class="n">rustc_middle</span>::<span class="n">ty</span>::<span class="n">query</span>::<span class="o">&lt;</span><span class="k">impl</span><span class="w"> </span><span class="n">rustc_middle</span>::<span class="n">ty</span>::<span class="n">context</span>::<span class="n">TyCtxt</span><span class="o">&gt;</span>::<span class="n">type_implements_trait</span>::<span class="n">h87bf70fd0998a8a7</span><span class="w"></span>
<span class="w">                               </span><span class="n">at</span><span class="w"> </span><span class="o">/</span><span class="n">mnt</span><span class="o">/</span><span class="n">d</span><span class="o">/</span><span class="n">work</span><span class="o">/</span><span class="n">rust</span><span class="o">/</span><span class="n">lqd</span><span class="o">-</span><span class="n">rust</span><span class="o">/</span><span class="n">compiler</span><span class="o">/</span><span class="n">rustc_middle</span><span class="o">/</span><span class="n">src</span><span class="o">/</span><span class="n">ty</span><span class="o">/</span><span class="n">query</span><span class="o">/</span><span class="k">mod</span><span class="p">.</span><span class="n">rs</span>:<span class="mi">188</span>:<span class="mi">17</span><span class="w"></span>
<span class="w">  </span><span class="mi">42</span>:     <span class="mh">0x7f44e2f4579d</span><span class="w"> </span><span class="o">-</span><span class="w"> </span><span class="n">rustc_typeck</span>::<span class="n">check</span>::<span class="n">upvar</span>::<span class="o">&lt;</span><span class="k">impl</span><span class="w"> </span><span class="n">rustc_typeck</span>::<span class="n">check</span>::<span class="n">fn_ctxt</span>::<span class="n">FnCtxt</span><span class="o">&gt;</span>::<span class="n">has_significant_drop_outside_of_captures</span>::<span class="p">{{</span><span class="n">closure</span><span class="p">}}</span>::<span class="n">hfaca0405df3839eb</span><span class="w"></span>
<span class="w">                               </span><span class="n">at</span><span class="w"> </span><span class="o">/</span><span class="n">mnt</span><span class="o">/</span><span class="n">d</span><span class="o">/</span><span class="n">work</span><span class="o">/</span><span class="n">rust</span><span class="o">/</span><span class="n">lqd</span><span class="o">-</span><span class="n">rust</span><span class="o">/</span><span class="n">compiler</span><span class="o">/</span><span class="n">rustc_typeck</span><span class="o">/</span><span class="n">src</span><span class="o">/</span><span class="n">check</span><span class="o">/</span><span class="n">upvar</span><span class="p">.</span><span class="n">rs</span>:<span class="mi">964</span>:<span class="mi">13</span><span class="w"></span>
</code></pre></div>



<a name="244872489"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244872489" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244872489">(Jul 04 2021 at 18:59)</a>:</h4>
<p>looks like the same thing</p>



<a name="244872493"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244872493" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244872493">(Jul 04 2021 at 18:59)</a>:</h4>
<p>Yea issue is within <code>type_implements_trait</code></p>



<a name="244872499"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244872499" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244872499">(Jul 04 2021 at 19:00)</a>:</h4>
<p>From the presepective of 2229, there is a check that can just be removed since it's not adding value and niko has created an issue to fix that query properly</p>



<a name="244872729"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244872729" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244872729">(Jul 04 2021 at 19:04)</a>:</h4>
<p>it'll be interesting to see whether that's completely covered by the issue to refactor these queries, since it's about canonicalization, rather than some weirdness about incremental behaviour</p>



<a name="244875213"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244875213" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244875213">(Jul 04 2021 at 20:07)</a>:</h4>
<p>(tiny update on reproduceability: with incr turned on, the ICE reproduces on tokio <code>0531549b6ea66d22d301044910ddc6a77e8c7f1e</code> not just master, so the latter's compile errors are not related to the issue)</p>



<a name="244875592"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244875592" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244875592">(Jul 04 2021 at 20:16)</a>:</h4>
<p>thank you for looking into this!</p>



<a name="244875663"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244875663" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244875663">(Jul 04 2021 at 20:18)</a>:</h4>
<p>Another interesting thing to note is that there seems to be another way to query  if a trait implemetns a type that we are using for the upvar migration: <a href="https://doc.rust-lang.org/nightly/nightly-rustc/rustc_typeck/check/fn_ctxt/struct.FnCtxt.html#method.ty_impls_trait">https://doc.rust-lang.org/nightly/nightly-rustc/rustc_typeck/check/fn_ctxt/struct.FnCtxt.html#method.ty_impls_trait</a></p>



<a name="244875754"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244875754" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244875754">(Jul 04 2021 at 20:20)</a>:</h4>
<p>I followed the function calls, and this one ends up with evaluate_obligation which from what i understand is a good example oh how conacolization should be done</p>



<a name="244875767"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244875767" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244875767">(Jul 04 2021 at 20:21)</a>:</h4>
<p>Not sure what is the benefit of looking at one over the other</p>



<a name="244876067"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244876067" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244876067">(Jul 04 2021 at 20:29)</a>:</h4>
<p>it’s interesting because one of the fixes to the <code>type_implements_trait</code> query that Niko mentioned IIRC was to move it to <code>FnCtxt</code> where this <code>ty_impls_trait</code> exists</p>



<a name="244876145"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244876145" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244876145">(Jul 04 2021 at 20:31)</a>:</h4>
<p>I'm pretty sure <code>ty_impl_traits</code> was added for abstracting some migration code</p>



<a name="244876373"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244876373" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244876373">(Jul 04 2021 at 20:36)</a>:</h4>
<p><span class="user-mention silent" data-user-id="116113">lqd</span> <a href="#narrow/stream/189812-t-compiler.2Fwg-rfc-2229/topic/migration.20bug/near/244876067">said</a>:</p>
<blockquote>
<p>it’s interesting because one of the fixes to the <code>type_implements_trait</code> query that Niko mentioned IIRC was to move it to <code>FnCtxt</code> where this <code>ty_impls_trait</code> exists</p>
</blockquote>
<p>the reason it was moved because we need access to infcx</p>



<a name="244879239"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244879239" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244879239">(Jul 04 2021 at 21:50)</a>:</h4>
<p><span class="user-mention silent" data-user-id="281950">Aman Arora</span> <a href="#narrow/stream/189812-t-compiler.2Fwg-rfc-2229/topic/migration.20bug/near/244868860">said</a>:</p>
<blockquote>
<p><span class="user-mention silent" data-user-id="116009">nikomatsakis</span>  I'm curious if you tried this on tokio? Like running cargo fix with your build of the compiler</p>
</blockquote>
<p><del>nope, give it a try?</del></p>



<a name="244879308"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244879308" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244879308">(Jul 04 2021 at 21:52)</a>:</h4>
<p>so</p>



<a name="244879312"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244879312" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244879312">(Jul 04 2021 at 21:52)</a>:</h4>
<p>let me double check how I fixed it <em>but</em></p>



<a name="244879318"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244879318" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244879318">(Jul 04 2021 at 21:52)</a>:</h4>
<p>I think the stable hasher thing may be because we are still executing the query with region variables</p>



<a name="244879320"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244879320" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244879320">(Jul 04 2021 at 21:53)</a>:</h4>
<p>and I guess they have no stable hash</p>



<a name="244879329"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244879329" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244879329">(Jul 04 2021 at 21:53)</a>:</h4>
<p>to fix that we would want to introduce some sort of "wrapper" around the query I guess</p>



<a name="244879340"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244879340" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244879340">(Jul 04 2021 at 21:53)</a>:</h4>
<p>my fix was very targeted, I didn't move the function anywhere</p>



<a name="244879346"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244879346" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244879346">(Jul 04 2021 at 21:53)</a>:</h4>
<p>Isn't that why we set regions to erased in writeback?</p>



<a name="244879355"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244879355" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244879355">(Jul 04 2021 at 21:54)</a>:</h4>
<p><span class="user-mention silent" data-user-id="116009">nikomatsakis</span> <a href="#narrow/stream/189812-t-compiler.2Fwg-rfc-2229/topic/migration.20bug/near/244879320">said</a>:</p>
<blockquote>
<p>and I guess they have no stable hash</p>
</blockquote>
<p>meant to reply to this</p>



<a name="244879392"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244879392" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244879392">(Jul 04 2021 at 21:54)</a>:</h4>
<p>maybe we do that here too?</p>



<a name="244879415"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244879415" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244879415">(Jul 04 2021 at 21:54)</a>:</h4>
<p>nvm i remember it causing issues, that's why we changed to resolve_vars_if_possible instead of writeback::Resolver::resolve / fold_ty</p>



<a name="244879431"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244879431" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244879431">(Jul 04 2021 at 21:55)</a>:</h4>
<p>so</p>



<a name="244879441"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244879441" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244879441">(Jul 04 2021 at 21:55)</a>:</h4>
<p>we shuld probably file another bug, ideally with a distinct repro</p>



<a name="244879495"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244879495" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244879495">(Jul 04 2021 at 21:56)</a>:</h4>
<p>but <a href="https://github.com/rust-lang/rust/blob/492ba34a91612005336b8fbcc3cc16447ebc343a/compiler/rustc_trait_selection/src/traits/mod.rs#L564-L571">this part</a> of my fix is already in the query</p>



<a name="244879502"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244879502" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244879502">(Jul 04 2021 at 21:56)</a>:</h4>
<p>that said, another option would be to mark that query as "eval always"</p>



<a name="244879509"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244879509" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244879509">(Jul 04 2021 at 21:57)</a>:</h4>
<p>I think that will cause it not to do hashing</p>



<a name="244879515"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244879515" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244879515">(Jul 04 2021 at 21:57)</a>:</h4>
<p>and anyway that query just <em>immediately</em> invokes another query</p>



<a name="244879527"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244879527" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244879527">(Jul 04 2021 at 21:57)</a>:</h4>
<p><span class="user-mention silent" data-user-id="116009">nikomatsakis</span> <a href="#narrow/stream/189812-t-compiler.2Fwg-rfc-2229/topic/migration.20bug/near/244879509">said</a>:</p>
<blockquote>
<p>I think that will cause it not to do hashing</p>
</blockquote>
<p><span class="user-mention" data-user-id="125294">@Aaron Hill</span> can probably confirm this, or <span class="user-mention" data-user-id="124287">@mw</span></p>



<a name="244879531"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244879531" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244879531">(Jul 04 2021 at 21:57)</a>:</h4>
<p><span class="user-mention silent" data-user-id="116009">nikomatsakis</span> <a href="#narrow/stream/189812-t-compiler.2Fwg-rfc-2229/topic/migration.20bug/near/244879515">said</a>:</p>
<blockquote>
<p>and anyway that query just <em>immediately</em> invokes another query</p>
</blockquote>
<p><a href="https://github.com/rust-lang/rust/blob/492ba34a91612005336b8fbcc3cc16447ebc343a/compiler/rustc_trait_selection/src/traits/mod.rs#L579">right here</a></p>



<a name="244879537"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244879537" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244879537">(Jul 04 2021 at 21:57)</a>:</h4>
<p>well, does it...? I forget</p>



<a name="244879581"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244879581" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244879581">(Jul 04 2021 at 21:58)</a>:</h4>
<p>(yes, it does)</p>



<a name="244879588"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244879588" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244879588">(Jul 04 2021 at 21:58)</a>:</h4>
<p>yea it call eval_obligation_no_overflow</p>



<a name="244879596"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244879596" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244879596">(Jul 04 2021 at 21:59)</a>:</h4>
<p>yes, and <a href="https://github.com/rust-lang/rust/blob/492ba34a91612005336b8fbcc3cc16447ebc343a/compiler/rustc_trait_selection/src/traits/query/evaluate_obligation.rs#L61-L74">that eventually invokes a query</a></p>



<a name="244879615"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244879615" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244879615">(Jul 04 2021 at 22:00)</a>:</h4>
<p>I noticed that before and thought "this is a silly query to cache"</p>



<a name="244879685"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244879685" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244879685">(Jul 04 2021 at 22:00)</a>:</h4>
<p>if you have a repro handy, <span class="user-mention" data-user-id="281950">@Aman Arora</span>, try changing</p>
<div class="codehilite" data-code-language="Rust"><pre><span></span><code><span class="w">    </span><span class="n">query</span><span class="w"> </span><span class="n">type_implements_trait</span><span class="p">(</span><span class="w"></span>
<span class="w">        </span><span class="n">key</span>: <span class="p">(</span><span class="n">DefId</span><span class="p">,</span><span class="w"> </span><span class="n">Ty</span><span class="o">&lt;'</span><span class="na">tcx</span><span class="o">&gt;</span><span class="p">,</span><span class="w"> </span><span class="n">SubstsRef</span><span class="o">&lt;'</span><span class="na">tcx</span><span class="o">&gt;</span><span class="p">,</span><span class="w"> </span><span class="n">ty</span>::<span class="n">ParamEnv</span><span class="o">&lt;'</span><span class="na">tcx</span><span class="o">&gt;</span><span class="p">,</span><span class="w"> </span><span class="p">)</span><span class="w"></span>
<span class="w">    </span><span class="p">)</span><span class="w"> </span>-&gt; <span class="nc">traits</span>::<span class="n">EvaluationResult</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">        </span><span class="n">desc</span><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="s">"evaluating `type_implements_trait` `{:?}`"</span><span class="p">,</span><span class="w"> </span><span class="n">key</span><span class="w"> </span><span class="p">}</span><span class="w"></span>
<span class="w">    </span><span class="p">}</span><span class="w"></span>
</code></pre></div>
<p>to </p>
<div class="codehilite" data-code-language="Rust"><pre><span></span><code><span class="w">    </span><span class="n">query</span><span class="w"> </span><span class="n">type_implements_trait</span><span class="p">(</span><span class="w"></span>
<span class="w">        </span><span class="n">key</span>: <span class="p">(</span><span class="n">DefId</span><span class="p">,</span><span class="w"> </span><span class="n">Ty</span><span class="o">&lt;'</span><span class="na">tcx</span><span class="o">&gt;</span><span class="p">,</span><span class="w"> </span><span class="n">SubstsRef</span><span class="o">&lt;'</span><span class="na">tcx</span><span class="o">&gt;</span><span class="p">,</span><span class="w"> </span><span class="n">ty</span>::<span class="n">ParamEnv</span><span class="o">&lt;'</span><span class="na">tcx</span><span class="o">&gt;</span><span class="p">,</span><span class="w"> </span><span class="p">)</span><span class="w"></span>
<span class="w">    </span><span class="p">)</span><span class="w"> </span>-&gt; <span class="nc">traits</span>::<span class="n">EvaluationResult</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">        </span><span class="n">eval_always</span><span class="w"></span>
<span class="w">        </span><span class="n">desc</span><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="s">"evaluating `type_implements_trait` `{:?}`"</span><span class="p">,</span><span class="w"> </span><span class="n">key</span><span class="w"> </span><span class="p">}</span><span class="w"></span>
<span class="w">    </span><span class="p">}</span><span class="w"></span>
</code></pre></div>



<a name="244879687"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244879687" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244879687">(Jul 04 2021 at 22:00)</a>:</h4>
<p>and see if that fixes it</p>



<a name="244879689"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244879689" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244879689">(Jul 04 2021 at 22:00)</a>:</h4>
<p>(do you know what <code>eval_always</code> is?)</p>



<a name="244879697"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244879697" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244879697">(Jul 04 2021 at 22:01)</a>:</h4>
<p>I'm assuming don't cache and just run the associated method regardless?</p>



<a name="244879708"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244879708" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Hill <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244879708">(Jul 04 2021 at 22:01)</a>:</h4>
<p>I think it might actually need to be an 'anon' query</p>



<a name="244879716"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244879716" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Hill <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244879716">(Jul 04 2021 at 22:01)</a>:</h4>
<p>An eval_always query will still hash the key, in order to compute a DepNode</p>



<a name="244879759"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244879759" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244879759">(Jul 04 2021 at 22:02)</a>:</h4>
<p>we could just make it not a query at all</p>



<a name="244879761"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244879761" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244879761">(Jul 04 2021 at 22:02)</a>:</h4>
<p>just make it a method on <code>TyCtxt</code></p>



<a name="244879765"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244879765" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244879765">(Jul 04 2021 at 22:02)</a>:</h4>
<p>it really doesn't need to be a query</p>



<a name="244879960"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244879960" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244879960">(Jul 04 2021 at 22:07)</a>:</h4>
<p>I'm assuming we'd still just return can't be solved in case the type contains inference variables? Because if we don't have the type when that method is called we can't make any judgement</p>



<a name="244880167"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244880167" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244880167">(Jul 04 2021 at 22:13)</a>:</h4>
<p><span class="user-mention" data-user-id="281950">@Aman Arora</span> yes I wouldn't change the code at all</p>



<a name="244880219"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244880219" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244880219">(Jul 04 2021 at 22:14)</a>:</h4>
<p>I'll do that, is there a guide to setup incremental tests?</p>



<a name="244886924"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244886924" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244886924">(Jul 05 2021 at 01:45)</a>:</h4>
<p><span class="user-mention" data-user-id="281950">@Aman Arora</span> not sure if there is</p>



<a name="244886970"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244886970" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244886970">(Jul 05 2021 at 01:46)</a>:</h4>
<p>src/test/incremental is where they live</p>



<a name="244886975"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244886975" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244886975">(Jul 05 2021 at 01:46)</a>:</h4>
<p>probably a test like this would suffice:</p>
<div class="codehilite" data-code-language="Rust"><pre><span></span><code><span class="c1">// revisions: rpass1</span>

<span class="c1">// Regression test that `infer_outlives_predicates` can be</span>
<span class="c1">// used with incremental without an ICE.</span>

<span class="k">struct</span> <span class="nc">Foo</span><span class="o">&lt;'</span><span class="na">a</span><span class="p">,</span><span class="w"> </span><span class="n">T</span><span class="o">&gt;</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">  </span><span class="n">x</span>: <span class="kp">&amp;</span><span class="o">'</span><span class="na">a</span> <span class="nc">T</span><span class="w"></span>
<span class="p">}</span><span class="w"></span>

<span class="k">fn</span> <span class="nf">main</span><span class="p">()</span><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="p">}</span><span class="w"></span>
</code></pre></div>



<a name="244886976"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244886976" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244886976">(Jul 05 2021 at 01:46)</a>:</h4>
<p>that is src/test/incremental/issue-51409.rs</p>



<a name="244886982"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244886982" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244886982">(Jul 05 2021 at 01:47)</a>:</h4>
<p>the <code>"revisions"</code> list includes a name for each time the test will be compield</p>



<a name="244886985"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244886985" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244886985">(Jul 05 2021 at 01:47)</a>:</h4>
<p>in this case, only once</p>



<a name="244886988"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244886988" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244886988">(Jul 05 2021 at 01:47)</a>:</h4>
<p>other tests use <code>#[cfg]</code> to change the source in between revisions</p>



<a name="244886990"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244886990" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244886990">(Jul 05 2021 at 01:47)</a>:</h4>
<p>but I bet here just enabling incremental mode at all will suffice</p>



<a name="244910415"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244910415" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> mw <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244910415">(Jul 05 2021 at 08:57)</a>:</h4>
<p>Does the problem occur while hashing the query key or while hashing the query result?</p>



<a name="244910682"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244910682" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> mw <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244910682">(Jul 05 2021 at 09:00)</a>:</h4>
<p>If the problem happens while hashing the result, you should be able to use <code>no_hash</code> (see <a href="https://rustc-dev-guide.rust-lang.org/queries/incremental-compilation-in-detail.html#query-modifiers">rustc-dev-guide</a>). But I cannot judge if that would just <em>hide</em> the underlying problem.</p>



<a name="244917913"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244917913" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244917913">(Jul 05 2021 at 10:17)</a>:</h4>
<p>query key</p>



<a name="244919757"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244919757" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244919757">(Jul 05 2021 at 10:39)</a>:</h4>
<p>here's the tokio incr ICE (for reference, triggered with the command <code>rustc --crate-name mini_tokio --edition=2018 src/main.rs --crate-type bin --emit=dep-info,metadata -C embed-bitcode=no -C debuginfo=2 -C metadata=d391c846a0d0848a -C extra-filename=-d391c846a0d0848a -C incremental=./incremental</code>)</p>
<div class="codehilite" data-code-language="Rust"><pre><span></span><code><span class="cp">#![warn(rust_2021_compatibility)]</span><span class="w"></span>

<span class="k">use</span><span class="w"> </span><span class="n">std</span>::<span class="n">future</span>::<span class="n">Future</span><span class="p">;</span><span class="w"></span>
<span class="k">use</span><span class="w"> </span><span class="n">std</span>::<span class="n">pin</span>::<span class="n">Pin</span><span class="p">;</span><span class="w"></span>
<span class="k">use</span><span class="w"> </span><span class="n">std</span>::<span class="n">task</span>::<span class="p">{</span><span class="n">Poll</span><span class="p">,</span><span class="w"> </span><span class="n">Context</span><span class="p">};</span><span class="w"></span>

<span class="k">struct</span> <span class="nc">LocalSet</span><span class="w"> </span><span class="p">{}</span><span class="w"></span>
<span class="k">struct</span> <span class="nc">RunUntil</span><span class="o">&lt;'</span><span class="na">a</span><span class="p">,</span><span class="w"> </span><span class="n">F</span><span class="o">&gt;</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">    </span><span class="n">_local_set</span>: <span class="kp">&amp;</span><span class="o">'</span><span class="na">a</span> <span class="nc">LocalSet</span><span class="p">,</span><span class="w"></span>
<span class="w">    </span><span class="n">_future</span>: <span class="nc">F</span><span class="p">,</span><span class="w"></span>
<span class="p">}</span><span class="w"></span>
<span class="k">impl</span><span class="o">&lt;'</span><span class="na">a</span><span class="p">,</span><span class="w"> </span><span class="n">F</span><span class="o">&gt;</span><span class="w"> </span><span class="n">RunUntil</span><span class="o">&lt;'</span><span class="na">a</span><span class="p">,</span><span class="w"> </span><span class="n">F</span><span class="o">&gt;</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">    </span><span class="k">fn</span> <span class="nf">project</span><span class="o">&lt;'</span><span class="na">pin</span><span class="o">&gt;</span><span class="p">(</span><span class="bp">self</span>: <span class="nc">Pin</span><span class="o">&lt;&amp;'</span><span class="na">pin</span><span class="w"> </span><span class="k">mut</span><span class="w"> </span><span class="bp">Self</span><span class="o">&gt;</span><span class="p">)</span><span class="w"> </span>-&gt; <span class="nc">Projection</span><span class="o">&lt;'</span><span class="na">pin</span><span class="p">,</span><span class="w"> </span><span class="o">'</span><span class="na">a</span><span class="p">,</span><span class="w"> </span><span class="n">F</span><span class="o">&gt;</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">        </span><span class="fm">unimplemented!</span><span class="p">()</span><span class="w"></span>
<span class="w">    </span><span class="p">}</span><span class="w"></span>
<span class="p">}</span><span class="w"></span>

<span class="k">struct</span> <span class="nc">Projection</span><span class="o">&lt;'</span><span class="na">pin</span><span class="p">,</span><span class="w"> </span><span class="o">'</span><span class="na">a</span><span class="p">,</span><span class="w"> </span><span class="n">F</span><span class="o">&gt;</span><span class="w"></span>
<span class="k">where</span><span class="w"></span>
<span class="w">    </span><span class="n">RunUntil</span><span class="o">&lt;'</span><span class="na">a</span><span class="p">,</span><span class="w"> </span><span class="n">F</span><span class="o">&gt;</span>: <span class="o">'</span><span class="na">pin</span><span class="p">,</span><span class="w"></span>
<span class="p">{</span><span class="w"></span>
<span class="w">    </span><span class="k">pub</span><span class="w"> </span><span class="n">local_set</span>: <span class="kp">&amp;</span><span class="o">'</span><span class="na">pin</span> <span class="nc">mut</span><span class="w"> </span><span class="o">&amp;'</span><span class="na">a</span><span class="w"> </span><span class="n">LocalSet</span><span class="p">,</span><span class="w"></span>
<span class="w">    </span><span class="k">pub</span><span class="w"> </span><span class="n">future</span>: <span class="nc">Pin</span><span class="o">&lt;&amp;'</span><span class="na">pin</span><span class="w"> </span><span class="k">mut</span><span class="w"> </span><span class="n">F</span><span class="o">&gt;</span><span class="p">,</span><span class="w"></span>
<span class="p">}</span><span class="w"></span>

<span class="k">impl</span><span class="w"> </span><span class="n">LocalSet</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">    </span><span class="k">fn</span> <span class="nf">with</span><span class="o">&lt;</span><span class="n">T</span><span class="o">&gt;</span><span class="p">(</span><span class="o">&amp;</span><span class="bp">self</span><span class="p">,</span><span class="w"> </span><span class="n">_f</span>: <span class="nc">impl</span><span class="w"> </span><span class="nb">FnOnce</span><span class="p">()</span><span class="w"> </span>-&gt; <span class="nc">T</span><span class="p">)</span><span class="w"> </span>-&gt; <span class="nc">T</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">        </span><span class="fm">unimplemented!</span><span class="p">()</span><span class="w"></span>
<span class="w">    </span><span class="p">}</span><span class="w"></span>
<span class="p">}</span><span class="w"></span>
<span class="k">impl</span><span class="o">&lt;</span><span class="n">T</span>: <span class="nc">Future</span><span class="o">&gt;</span><span class="w"> </span><span class="n">Future</span><span class="w"> </span><span class="k">for</span><span class="w"> </span><span class="n">RunUntil</span><span class="o">&lt;'</span><span class="nb">_</span><span class="p">,</span><span class="w"> </span><span class="n">T</span><span class="o">&gt;</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">    </span><span class="k">type</span> <span class="nc">Output</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">T</span>::<span class="n">Output</span><span class="p">;</span><span class="w"></span>
<span class="w">    </span><span class="k">fn</span> <span class="nf">poll</span><span class="p">(</span><span class="bp">self</span>: <span class="nc">Pin</span><span class="o">&lt;&amp;</span><span class="k">mut</span><span class="w"> </span><span class="bp">Self</span><span class="o">&gt;</span><span class="p">,</span><span class="w"> </span><span class="n">cx</span>: <span class="kp">&amp;</span><span class="nc">mut</span><span class="w"> </span><span class="n">Context</span><span class="o">&lt;'</span><span class="nb">_</span><span class="o">&gt;</span><span class="p">)</span><span class="w"> </span>-&gt; <span class="nc">Poll</span><span class="o">&lt;</span><span class="bp">Self</span>::<span class="n">Output</span><span class="o">&gt;</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">        </span><span class="kd">let</span><span class="w"> </span><span class="n">me</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="bp">self</span><span class="p">.</span><span class="n">project</span><span class="p">();</span><span class="w"></span>
<span class="w">        </span><span class="n">me</span><span class="p">.</span><span class="n">local_set</span><span class="p">.</span><span class="n">with</span><span class="p">(</span><span class="o">||</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">            </span><span class="kd">let</span><span class="w"> </span><span class="n">_</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">cx</span><span class="p">.</span><span class="n">waker</span><span class="p">();</span><span class="w"></span>
<span class="w">            </span><span class="kd">let</span><span class="w"> </span><span class="n">f</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">me</span><span class="p">.</span><span class="n">future</span><span class="p">;</span><span class="w"></span>
<span class="w">            </span><span class="kd">let</span><span class="w"> </span><span class="n">_</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">f</span><span class="p">.</span><span class="n">poll</span><span class="p">(</span><span class="n">cx</span><span class="p">);</span><span class="w"></span>
<span class="w">            </span><span class="n">Poll</span>::<span class="n">Pending</span><span class="w"></span>
<span class="w">        </span><span class="p">})</span><span class="w"></span>
<span class="w">    </span><span class="p">}</span><span class="w"></span>
<span class="p">}</span><span class="w"></span>

<span class="k">fn</span> <span class="nf">main</span><span class="p">()</span><span class="w"> </span><span class="p">{}</span><span class="w"></span>
</code></pre></div>



<a name="244919948"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244919948" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244919948">(Jul 05 2021 at 10:41)</a>:</h4>
<p>(just using revisions will not work IMO: the test will need to opt in using <code>-C incremental</code>)</p>



<a name="244967686"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244967686" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244967686">(Jul 05 2021 at 19:30)</a>:</h4>
<p>OK. I didn't see any PR, I may take a minute to prep one, since this seems like a fairly small change.</p>



<a name="244967782"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244967782" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244967782">(Jul 05 2021 at 19:32)</a>:</h4>
<p>I'm currently working with Roxane to edit the reference, but can do this probably by tomorrow morning</p>



<a name="244969226"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244969226" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244969226">(Jul 05 2021 at 19:55)</a>:</h4>
<p>We are done with the Rust reference <span class="user-mention" data-user-id="116009">@nikomatsakis</span>  did you start on the PR or should I go ahead and do that?</p>



<a name="244972833"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244972833" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244972833">(Jul 05 2021 at 20:44)</a>:</h4>
<p><span class="user-mention" data-user-id="281950">@Aman Arora</span> I did not start</p>



<a name="244972841"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244972841" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244972841">(Jul 05 2021 at 20:45)</a>:</h4>
<p>I could do now potentially, but if you're doing it, I'll hold off</p>



<a name="244973495"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244973495" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244973495">(Jul 05 2021 at 20:54)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span>  I can start, we are just removing the query and making it a method on TyCtx right? I don't think the discussion with <code>@mw</code> above resulted in a decision for using no hash</p>



<a name="244974114"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244974114" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244974114">(Jul 05 2021 at 21:02)</a>:</h4>
<p>Right</p>



<a name="244974119"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244974119" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244974119">(Jul 05 2021 at 21:02)</a>:</h4>
<p>Just remove the query</p>



<a name="244975351"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244975351" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244975351">(Jul 05 2021 at 21:24)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> tcx won't have access to infcx to call the eval obligation</p>



<a name="244975393"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244975393" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244975393">(Jul 05 2021 at 21:25)</a>:</h4>
<p>wait that doesn't make sense the query was running using infcx</p>



<a name="244976126"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244976126" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244976126">(Jul 05 2021 at 21:39)</a>:</h4>
<p>yes, the function creates its own infcx</p>



<a name="244976629"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244976629" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244976629">(Jul 05 2021 at 21:47)</a>:</h4>
<p><span class="user-mention silent" data-user-id="116009">nikomatsakis</span> <a href="#narrow/stream/189812-t-compiler.2Fwg-rfc-2229/topic/migration.20bug/near/244976126">said</a>:</p>
<blockquote>
<p>yes, the function creates its own infcx</p>
</blockquote>
<p>But if i understand that correctly rustc_middle would've to depend upto rustc_infer and end up causing a circular dependcy</p>



<a name="244976756"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244976756" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244976756">(Jul 05 2021 at 21:49)</a>:</h4>
<p>does that code depend on any logic that is part of <code>rustc_infer</code>?</p>



<a name="244976808"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244976808" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244976808">(Jul 05 2021 at 21:50)</a>:</h4>
<p>To create the infer_ctxt yes</p>



<a name="244976846"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244976846" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244976846">(Jul 05 2021 at 21:51)</a>:</h4>
<p><a href="https://github.com/rust-lang/rust/blob/master/compiler/rustc_infer/src/infer/mod.rs#L531-L545">https://github.com/rust-lang/rust/blob/master/compiler/rustc_infer/src/infer/mod.rs#L531-L545</a></p>



<a name="244976861"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244976861" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244976861">(Jul 05 2021 at 21:51)</a>:</h4>
<p>This is where the code for creating a new infer_ctx within tcx is defined</p>



<a name="244976867"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244976867" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244976867">(Jul 05 2021 at 21:51)</a>:</h4>
<p>Yes, I see</p>



<a name="244976876"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244976876" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244976876">(Jul 05 2021 at 21:51)</a>:</h4>
<p>We could just move it into the <code>InferCtxtExt</code> set of methods</p>



<a name="244976880"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244976880" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244976880">(Jul 05 2021 at 21:51)</a>:</h4>
<p>I don't think it particularly belongs where it is</p>



<a name="244976928"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244976928" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244976928">(Jul 05 2021 at 21:52)</a>:</h4>
<p>This is kind of annoying :)</p>



<a name="244976940"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244976940" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244976940">(Jul 05 2021 at 21:52)</a>:</h4>
<p>But that seems ok</p>



<a name="244976968"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244976968" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244976968">(Jul 05 2021 at 21:53)</a>:</h4>
<p><span class="user-mention silent" data-user-id="116009">nikomatsakis</span> <a href="#narrow/stream/189812-t-compiler.2Fwg-rfc-2229/topic/migration.20bug/near/244976876">said</a>:</p>
<blockquote>
<p>We could just move it into the <code>InferCtxtExt</code> set of methods</p>
</blockquote>
<p>This is not implemented for tcx</p>



<a name="244976983"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244976983" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244976983">(Jul 05 2021 at 21:53)</a>:</h4>
<p><a href="https://doc.rust-lang.org/nightly/nightly-rustc/rustc_trait_selection/infer/trait.InferCtxtExt.html">https://doc.rust-lang.org/nightly/nightly-rustc/rustc_trait_selection/infer/trait.InferCtxtExt.html</a></p>



<a name="244977003"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244977003" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244977003">(Jul 05 2021 at 21:53)</a>:</h4>
<p>did you mean TyCtxtInferExt</p>



<a name="244977063"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244977063" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244977063">(Jul 05 2021 at 21:54)</a>:</h4>
<p>yes</p>



<a name="244977067"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244977067" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244977067">(Jul 05 2021 at 21:54)</a>:</h4>
<p>wherever <code>infer_ctxt</code> is defined</p>



<a name="244977087"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244977087" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244977087">(Jul 05 2021 at 21:54)</a>:</h4>
<p>I bet most callers to <code>type_implements_trait</code> have that imported or available</p>



<a name="244977099"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244977099" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244977099">(Jul 05 2021 at 21:55)</a>:</h4>
<p>Yes</p>



<a name="244977104"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244977104" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244977104">(Jul 05 2021 at 21:55)</a>:</h4>
<p>it'd be nice if there were a query mode that is like "just a normal function"</p>



<a name="244977131"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244977131" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244977131">(Jul 05 2021 at 21:55)</a>:</h4>
<p>let me try this, might have some circular rependcy for having to use rustc_traits for the obligation/evaluation result structs</p>



<a name="244977357"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244977357" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244977357">(Jul 05 2021 at 22:00)</a>:</h4>
<p>the alternative would be to make a rustc_traits extension trait</p>



<a name="244977383"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244977383" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244977383">(Jul 05 2021 at 22:00)</a>:</h4>
<p>there may even already be one?</p>



<a name="244977423"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244977423" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244977423">(Jul 05 2021 at 22:00)</a>:</h4>
<p>doens't look that way</p>



<a name="244977458"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244977458" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244977458">(Jul 05 2021 at 22:00)</a>:</h4>
<p><span class="user-mention" data-user-id="281950">@Aman Arora</span> the <em>other</em> alternative is to make a "raw" variant of the query</p>



<a name="244977462"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244977462" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244977462">(Jul 05 2021 at 22:00)</a>:</h4>
<p>and move the logic we want to move (the test) into a wrapper around it</p>



<a name="244977541"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244977541" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244977541">(Jul 05 2021 at 22:02)</a>:</h4>
<p>I'm still trying the TyCtxExt</p>



<a name="244977554"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244977554" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244977554">(Jul 05 2021 at 22:02)</a>:</h4>
<p>If this doesn't work, I'll try the other approaches</p>



<a name="244978281"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244978281" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244978281">(Jul 05 2021 at 22:16)</a>:</h4>
<p>So the call to evaluate_obligation is defined wsithin trait selection</p>



<a name="244978293"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/244978293" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#244978293">(Jul 05 2021 at 22:16)</a>:</h4>
<p>and trait_selection depends on rustc_infer</p>



<a name="245016232"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/245016232" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#245016232">(Jul 06 2021 at 09:45)</a>:</h4>
<p><span class="user-mention silent" data-user-id="116009">nikomatsakis</span> <a href="#narrow/stream/189812-t-compiler.2Fwg-rfc-2229/topic/migration.20bug/near/244977357">said</a>:</p>
<blockquote>
<p>the alternative would be to make a rustc_traits extension trait</p>
</blockquote>
<p>This worked <a href="https://github.com/rust-lang/rust/pull/86901">https://github.com/rust-lang/rust/pull/86901</a></p>



<a name="245016316"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/245016316" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#245016316">(Jul 06 2021 at 09:46)</a>:</h4>
<p>I tested tokio with </p>
<div class="codehilite"><pre><span></span><code>cargo +stage1 fix --edition
cargo +stage1 fix --edition --allow-dirty
</code></pre></div>
<p>and will add a test to the PR soon</p>



<a name="245017452"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/245017452" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#245017452">(Jul 06 2021 at 09:59)</a>:</h4>
<p>I added a test case, thought idk if it's actually testing the incremental issue</p>



<a name="245018747"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/245018747" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#245018747">(Jul 06 2021 at 10:13)</a>:</h4>
<p><span class="user-mention" data-user-id="281950">@Aman Arora</span> cool! Re: the test, were you able to see that it fails without your PR?</p>



<a name="245018776"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/245018776" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#245018776">(Jul 06 2021 at 10:13)</a>:</h4>
<p>I didn't try that</p>



<a name="245018826"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/245018826" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#245018826">(Jul 06 2021 at 10:14)</a>:</h4>
<p>let me build master</p>



<a name="245018847"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/245018847" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#245018847">(Jul 06 2021 at 10:14)</a>:</h4>
<p><span class="user-mention silent" data-user-id="116113">lqd</span> <a href="#narrow/stream/189812-t-compiler.2Fwg-rfc-2229/topic/migration.20bug/near/244919757">said</a>:</p>
<blockquote>
<p>here's the tokio incr ICE (for reference, triggered with the command <code>rustc --crate-name mini_tokio --edition=2018 src/main.rs --crate-type bin --emit=dep-info,metadata -C embed-bitcode=no -C debuginfo=2 -C metadata=d391c846a0d0848a -C extra-filename=-d391c846a0d0848a -C incremental=./incremental</code>)</p>
<p><div class="codehilite" data-code-language="Rust"><pre><span></span><code><span class="cp">#![warn(rust_2021_compatibility)]</span><span class="w"></span>

<span class="k">use</span><span class="w"> </span><span class="n">std</span>::<span class="n">future</span>::<span class="n">Future</span><span class="p">;</span><span class="w"></span>
<span class="k">use</span><span class="w"> </span><span class="n">std</span>::<span class="n">pin</span>::<span class="n">Pin</span><span class="p">;</span><span class="w"></span>
<span class="k">use</span><span class="w"> </span><span class="n">std</span>::<span class="n">task</span>::<span class="p">{</span><span class="n">Poll</span><span class="p">,</span><span class="w"> </span><span class="n">Context</span><span class="p">};</span><span class="w"></span>

<span class="k">struct</span> <span class="nc">LocalSet</span><span class="w"> </span><span class="p">{}</span><span class="w"></span>
<span class="k">struct</span> <span class="nc">RunUntil</span><span class="o">&lt;'</span><span class="na">a</span><span class="p">,</span><span class="w"> </span><span class="n">F</span><span class="o">&gt;</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">    </span><span class="n">_local_set</span>: <span class="kp">&amp;</span><span class="o">'</span><span class="na">a</span> <span class="nc">LocalSet</span><span class="p">,</span><span class="w"></span>
<span class="w">    </span><span class="n">_future</span>: <span class="nc">F</span><span class="p">,</span><span class="w"></span>
<span class="p">}</span><span class="w"></span>
<span class="k">impl</span><span class="o">&lt;'</span><span class="na">a</span><span class="p">,</span><span class="w"> </span><span class="n">F</span><span class="o">&gt;</span><span class="w"> </span><span class="n">RunUntil</span><span class="o">&lt;'</span><span class="na">a</span><span class="p">,</span><span class="w"> </span><span class="n">F</span><span class="o">&gt;</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">    </span><span class="k">fn</span> <span class="nf">project</span><span class="o">&lt;'</span><span class="na">pin</span><span class="o">&gt;</span><span class="p">(</span><span class="bp">self</span>: <span class="nc">Pin</span><span class="o">&lt;&amp;'</span><span class="na">pin</span><span class="w"> </span><span class="k">mut</span><span class="w"> </span><span class="bp">Self</span><span class="o">&gt;</span><span class="p">)</span><span class="w"> </span>-&gt; <span class="nc">Projection</span><span class="o">&lt;'</span><span class="na">pin</span><span class="p">,</span><span class="w"> </span><span class="o">'</span><span class="na">a</span><span class="p">,</span><span class="w"> </span><span class="n">F</span><span class="o">&gt;</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">        </span><span class="fm">unimplemented!</span><span class="p">()</span><span class="w"></span>
<span class="w">    </span><span class="p">}</span><span class="w"></span>
<span class="p">}</span><span class="w"></span>

<span class="k">struct</span> <span class="nc">Projection</span><span class="o">&lt;'</span><span class="na">pin</span><span class="p">,</span><span class="w"> </span><span class="o">'</span><span class="na">a</span><span class="p">,</span><span class="w"> </span><span class="n">F</span><span class="o">&gt;</span><span class="w"></span>
<span class="k">where</span><span class="w"></span>
<span class="w">    </span><span class="n">RunUntil</span><span class="o">&lt;'</span><span class="na">a</span><span class="p">,</span><span class="w"> </span><span class="n">F</span><span class="o">&gt;</span>: <span class="o">'</span><span class="na">pin</span><span class="p">,</span><span class="w"></span>
<span class="p">{</span><span class="w"></span>
<span class="w">    </span><span class="k">pub</span><span class="w"> </span><span class="n">local_set</span>: <span class="kp">&amp;</span><span class="o">'</span><span class="na">pin</span> <span class="nc">mut</span><span class="w"> </span><span class="o">&amp;'</span><span class="na">a</span><span class="w"> </span><span class="n">LocalSet</span><span class="p">,</span><span class="w"></span>
<span class="w">    </span><span class="k">pub</span><span class="w"> </span><span class="n">future</span>: <span class="nc">Pin</span><span class="o">&lt;&amp;'</span><span class="na">pin</span><span class="w"> </span><span class="k">mut</span><span class="w"> </span><span class="n">F</span><span class="o">&gt;</span><span class="p">,</span><span class="w"></span>
<span class="p">}</span><span class="w"></span>

<span class="k">impl</span><span class="w"> </span><span class="n">LocalSet</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">    </span><span class="k">fn</span> <span class="nf">with</span><span class="o">&lt;</span><span class="n">T</span><span class="o">&gt;</span><span class="p">(</span><span class="o">&amp;</span><span class="bp">self</span><span class="p">,</span><span class="w"> </span><span class="n">_f</span>: <span class="nc">impl</span><span class="w"> </span><span class="nb">FnOnce</span><span class="p">()</span><span class="w"> </span>-&gt; <span class="nc">T</span><span class="p">)</span><span class="w"> </span>-&gt; <span class="nc">T</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">        </span><span class="fm">unimplemented!</span><span class="p">()</span><span class="w"></span>
<span class="w">    </span><span class="p">}</span><span class="w"></span>
<span class="p">}</span><span class="w"></span>
<span class="k">impl</span><span class="o">&lt;</span><span class="n">T</span>: <span class="nc">Future</span><span class="o">&gt;</span><span class="w"> </span><span class="n">Future</span><span class="w"> </span><span class="k">for</span><span class="w"> </span><span class="n">RunUntil</span><span class="o">&lt;'</span><span class="nb">_</span><span class="p">,</span><span class="w"> </span><span class="n">T</span><span class="o">&gt;</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">    </span><span class="k">type</span> <span class="nc">Output</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">T</span>::<span class="n">Output</span><span class="p">;</span><span class="w"></span>
<span class="w">    </span><span class="k">fn</span> <span class="nf">poll</span><span class="p">(</span><span class="bp">self</span>: <span class="nc">Pin</span><span class="o">&lt;&amp;</span><span class="k">mut</span><span class="w"> </span><span class="bp">Self</span><span class="o">&gt;</span><span class="p">,</span><span class="w"> </span><span class="n">cx</span>: <span class="kp">&amp;</span><span class="nc">mut</span><span class="w"> </span><span class="n">Context</span><span class="o">&lt;'</span><span class="nb">_</span><span class="o">&gt;</span><span class="p">)</span><span class="w"> </span>-&gt; <span class="nc">Poll</span><span class="o">&lt;</span><span class="bp">Self</span>::<span class="n">Output</span><span class="o">&gt;</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">        </span><span class="kd">let</span><span class="w"> </span><span class="n">me</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="bp">self</span><span class="p">.</span><span class="n">project</span><span class="p">();</span><span class="w"></span>
<span class="w">        </span><span class="n">me</span><span class="p">.</span><span class="n">local_set</span><span class="p">.</span><span class="n">with</span><span class="p">(</span><span class="o">||</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">            </span><span class="kd">let</span><span class="w"> </span><span class="n">_</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">cx</span><span class="p">.</span><span class="n">waker</span><span class="p">();</span><span class="w"></span>
<span class="w">            </span><span class="kd">let</span><span class="w"> </span><span class="n">f</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">me</span><span class="p">.</span><span class="n">future</span><span class="p">;</span><span class="w"></span>
<span class="w">            </span><span class="kd">let</span><span class="w"> </span><span class="n">_</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">f</span><span class="p">.</span><span class="n">poll</span><span class="p">(</span><span class="n">cx</span><span class="p">);</span><span class="w"></span>
<span class="w">            </span><span class="n">Poll</span>::<span class="n">Pending</span><span class="w"></span>
<span class="w">        </span><span class="p">})</span><span class="w"></span>
<span class="w">    </span><span class="p">}</span><span class="w"></span>
<span class="p">}</span><span class="w"></span>

<span class="k">fn</span> <span class="nf">main</span><span class="p">()</span><span class="w"> </span><span class="p">{}</span><span class="w"></span>
</code></pre></div><br>
</p>
</blockquote>
<p>but it's what <code>@lqd</code> shared above</p>



<a name="245019010"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/245019010" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#245019010">(Jul 06 2021 at 10:16)</a>:</h4>
<p><span class="user-mention" data-user-id="281950">@Aman Arora</span> one thing is that I suspect you will have to modify clippy</p>



<a name="245019013"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/245019013" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#245019013">(Jul 06 2021 at 10:16)</a>:</h4>
<p>I'm not sure how to test that</p>



<a name="245019039"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/245019039" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#245019039">(Jul 06 2021 at 10:17)</a>:</h4>
<p>I only had to modify one spot, locally <code>x.py check clippy</code> passed</p>



<a name="245019050"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/245019050" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#245019050">(Jul 06 2021 at 10:17)</a>:</h4>
<p>ok good</p>



<a name="245019052"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/245019052" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#245019052">(Jul 06 2021 at 10:17)</a>:</h4>
<p>yes, just one spot</p>



<a name="245019077"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/245019077" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#245019077">(Jul 06 2021 at 10:17)</a>:</h4>
<p>Left one comment</p>



<a name="245019143"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/245019143" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#245019143">(Jul 06 2021 at 10:18)</a>:</h4>
<p>I suggested a FIXME to add, although you could actually even make the change I suggested (convert this to a method on <code>InferCtxt</code> instead)</p>



<a name="245019158"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/245019158" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#245019158">(Jul 06 2021 at 10:18)</a>:</h4>
<p>in the case of clippy, you would just invoke <code>tcx.infer_ctxt(|| ...)</code></p>



<a name="245019208"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/245019208" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#245019208">(Jul 06 2021 at 10:19)</a>:</h4>
<p>but I'm happy to land it as is</p>



<a name="245019212"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/245019212" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#245019212">(Jul 06 2021 at 10:19)</a>:</h4>
<p>and leave that for future work</p>



<a name="245019316"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/245019316" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#245019316">(Jul 06 2021 at 10:20)</a>:</h4>
<p><span class="user-mention silent" data-user-id="116009">nikomatsakis</span> <a href="#narrow/stream/189812-t-compiler.2Fwg-rfc-2229/topic/migration.20bug/near/245019158">said</a>:</p>
<blockquote>
<p>in the case of clippy, you would just invoke <code>tcx.infer_ctxt(|| ...)</code></p>
</blockquote>
<p>as in basically create the obligation in clippy and call the query?</p>



<a name="245019356"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/245019356" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#245019356">(Jul 06 2021 at 10:21)</a>:</h4>
<p>no</p>



<a name="245019364"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/245019364" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#245019364">(Jul 06 2021 at 10:21)</a>:</h4>
<p>I mean, you could do that, but instead: if you made that a method on <code>InferCtxt</code></p>



<a name="245019408"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/245019408" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#245019408">(Jul 06 2021 at 10:22)</a>:</h4>
<p>that is, you made <code>type_implements_trait</code> a method on <code>InferCtxt</code></p>



<a name="245019420"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/245019420" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#245019420">(Jul 06 2021 at 10:22)</a>:</h4>
<p>I checked and every caller in the compiler has an infer ctxt available</p>



<a name="245019425"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/245019425" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#245019425">(Jul 06 2021 at 10:22)</a>:</h4>
<p>the only place that <em>doesn't</em> is clippy</p>



<a name="245019456"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/245019456" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#245019456">(Jul 06 2021 at 10:22)</a>:</h4>
<p>but it can create one in the same way that this method does</p>



<a name="245019475"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/245019475" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#245019475">(Jul 06 2021 at 10:23)</a>:</h4>
<p>i see what you mean. I'm fine doing either approaches</p>



<a name="245019477"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/245019477" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#245019477">(Jul 06 2021 at 10:23)</a>:</h4>
<div class="codehilite" data-code-language="Rust"><pre><span></span><code><span class="w">        </span><span class="n">tcx</span><span class="p">.</span><span class="n">infer_ctxt</span><span class="p">().</span><span class="n">enter</span><span class="p">(</span><span class="o">|</span><span class="n">infcx</span><span class="o">|</span><span class="w"> </span><span class="n">infcx</span><span class="p">.</span><span class="n">evaluate_obligation_no_overflow</span><span class="p">(</span><span class="o">&amp;</span><span class="n">obligation</span><span class="p">))</span><span class="w"></span>
</code></pre></div>



<a name="245019498"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/245019498" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#245019498">(Jul 06 2021 at 10:23)</a>:</h4>
<p>well it <em>is</em> like 3am your time or something :)</p>



<a name="245019504"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/245019504" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#245019504">(Jul 06 2021 at 10:23)</a>:</h4>
<p>since we need to figure out to the test, I can make the change before we land</p>



<a name="245019508"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/245019508" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#245019508">(Jul 06 2021 at 10:23)</a>:</h4>
<p>I have a change for the test</p>



<a name="245019511"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/245019511" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#245019511">(Jul 06 2021 at 10:23)</a>:</h4>
<p>I did some local testing</p>



<a name="245019514"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/245019514" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#245019514">(Jul 06 2021 at 10:23)</a>:</h4>
<p>6am <span aria-label="joy" class="emoji emoji-1f602" role="img" title="joy">:joy:</span></p>



<a name="245019515"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/245019515" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#245019515">(Jul 06 2021 at 10:23)</a>:</h4>
<p>(a) I reproduced the ICE</p>



<a name="245019524"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/245019524" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#245019524">(Jul 06 2021 at 10:24)</a>:</h4>
<p>oh, I thought you were in Vancouver</p>



<a name="245019566"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/245019566" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#245019566">(Jul 06 2021 at 10:24)</a>:</h4>
<p>ok :)</p>



<a name="245019579"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/245019579" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#245019579">(Jul 06 2021 at 10:24)</a>:</h4>
<p>depending whether you just woke up or have been up all night that's more or less reasonable</p>



<a name="245019580"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/245019580" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#245019580">(Jul 06 2021 at 10:24)</a>:</h4>
<p>Not yet <span aria-label="smile" class="emoji emoji-1f642" role="img" title="smile">:smile:</span></p>



<a name="245019596"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/245019596" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#245019596">(Jul 06 2021 at 10:24)</a>:</h4>
<p>I'll make the change right now, shouldn't be too bad</p>



<a name="245019599"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/245019599" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#245019599">(Jul 06 2021 at 10:24)</a>:</h4>
<p><em>anyway</em> if it's all the same to you I'd rather have it be a method on <code>InferCtxt</code> (and remove the <code>if</code> and the FIXME)</p>



<a name="245019609"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/245019609" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#245019609">(Jul 06 2021 at 10:24)</a>:</h4>
<p>I will tweak the test for you</p>



<a name="245019629"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/245019629" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#245019629">(Jul 06 2021 at 10:25)</a>:</h4>
<p>The test as is fails on the current master <code>Error: internal compiler error: compiler/rustc_middle/src/ich/impls_ty.rs:94:17: StableHasher: unexpected region '_#3r</code></p>



<a name="245019635"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/245019635" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#245019635">(Jul 06 2021 at 10:25)</a>:</h4>
<p>oh, I can't for some reason</p>



<a name="245019637"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/245019637" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#245019637">(Jul 06 2021 at 10:25)</a>:</h4>
<p>but what you should do is:</p>



<a name="245019654"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/245019654" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#245019654">(Jul 06 2021 at 10:25)</a>:</h4>
<p>move it to <code>src/test/incremental</code></p>



<a name="245019662"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/245019662" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#245019662">(Jul 06 2021 at 10:25)</a>:</h4>
<p>and change the "header comments" to</p>
<div class="codehilite" data-code-language="Rust"><pre><span></span><code><span class="c1">// edition:2018</span>
<span class="c1">// revisions: rpass1</span>
</code></pre></div>



<a name="245019667"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/245019667" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#245019667">(Jul 06 2021 at 10:25)</a>:</h4>
<p>I tested and that reproduces the problem</p>



<a name="245019712"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/245019712" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#245019712">(Jul 06 2021 at 10:26)</a>:</h4>
<p>I'll make the change that you suggested as well</p>



<a name="245019729"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/245019729" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#245019729">(Jul 06 2021 at 10:26)</a>:</h4>
<p>shouldn't take long if I'm thinking about it correctly</p>



<a name="245019732"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/245019732" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#245019732">(Jul 06 2021 at 10:26)</a>:</h4>
<p>it'd probably be good to add a comment like:</p>
<div class="codehilite" data-code-language="Rust"><pre><span></span><code><span class="c1">// Regression test for #86753. The `type_implements_trait` query (since moved to a method)</span>
<span class="c1">// was encountering an ICE during incremental testing when hashing its arguments.</span>
</code></pre></div>



<a name="245019747"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/245019747" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#245019747">(Jul 06 2021 at 10:26)</a>:</h4>
<p><span class="user-mention silent" data-user-id="281950">Aman Arora</span> <a href="#narrow/stream/189812-t-compiler.2Fwg-rfc-2229/topic/migration.20bug/near/245019729">said</a>:</p>
<blockquote>
<p>shouldn't take long if I'm thinking about it correctly</p>
</blockquote>
<p>it should be pretty easy I think</p>



<a name="245020052"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/245020052" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#245020052">(Jul 06 2021 at 10:30)</a>:</h4>
<p>oh so the <code>src/test/incremental</code> tests have some behaviour that is specific to this location</p>



<a name="245020067"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/245020067" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#245020067">(Jul 06 2021 at 10:30)</a>:</h4>
<p>they enable incremental testing</p>



<a name="245020075"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/245020075" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#245020075">(Jul 06 2021 at 10:30)</a>:</h4>
<p>if you'd move the same test to where it's right now it wouldn't work</p>



<a name="245020083"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/245020083" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#245020083">(Jul 06 2021 at 10:30)</a>:</h4>
<p>right that's what I meant</p>



<a name="245020091"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/245020091" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#245020091">(Jul 06 2021 at 10:30)</a>:</h4>
<p>yes</p>



<a name="245020096"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/245020096" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#245020096">(Jul 06 2021 at 10:30)</a>:</h4>
<p>we should fix that</p>



<a name="245020099"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/245020099" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#245020099">(Jul 06 2021 at 10:30)</a>:</h4>
<p>that is not super clear if you don't know about it</p>



<a name="245020106"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/245020106" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#245020106">(Jul 06 2021 at 10:30)</a>:</h4>
<p>we've been moving away from having "modes" based on directories</p>



<a name="245020119"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/245020119" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#245020119">(Jul 06 2021 at 10:31)</a>:</h4>
<p>but I believe the incremental tests are still special</p>



<a name="245020131"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/245020131" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#245020131">(Jul 06 2021 at 10:31)</a>:</h4>
<p>in particular, they re-interpret the "revisions" parameter</p>



<a name="245020144"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/245020144" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#245020144">(Jul 06 2021 at 10:31)</a>:</h4>
<p>we should probably change that to <code>incremental-revisions</code> or something</p>



<a name="245020157"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/245020157" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#245020157">(Jul 06 2021 at 10:31)</a>:</h4>
<p>and then make it so that any test can be made incremental</p>



<a name="245020166"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/245020166" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#245020166">(Jul 06 2021 at 10:31)</a>:</h4>
<p>(should file a bug...)</p>



<a name="245020196"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/245020196" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#245020196">(Jul 06 2021 at 10:32)</a>:</h4>
<p>sorry for the noise then, but at least we've learned something</p>



<a name="245020211"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/245020211" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#245020211">(Jul 06 2021 at 10:32)</a>:</h4>
<p>I definitely prefer having "no modes", so that tests can be grouped based on what they test</p>



<a name="245022857"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/245022857" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#245022857">(Jul 06 2021 at 11:02)</a>:</h4>
<p>check build passed locally so I've pushed the change, still running the tests locally</p>



<a name="245022881"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/245022881" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#245022881">(Jul 06 2021 at 11:02)</a>:</h4>
<p><a href="https://doc.rust-lang.org/nightly/nightly-rustc/rustc_typeck/check/fn_ctxt/struct.FnCtxt.html#method.ty_impls_trait">https://doc.rust-lang.org/nightly/nightly-rustc/rustc_typeck/check/fn_ctxt/struct.FnCtxt.html#method.ty_impls_trait</a></p>



<a name="245022894"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/245022894" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#245022894">(Jul 06 2021 at 11:03)</a>:</h4>
<p>I suppose this duplicate method should also be removed</p>



<a name="245023413"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/245023413" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#245023413">(Jul 06 2021 at 11:09)</a>:</h4>
<p><span class="user-mention" data-user-id="281950">@Aman Arora</span> I'm leaving a few nits</p>



<a name="245023551"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/245023551" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#245023551">(Jul 06 2021 at 11:11)</a>:</h4>
<p><span class="user-mention silent" data-user-id="281950">Aman Arora</span> <a href="#narrow/stream/189812-t-compiler.2Fwg-rfc-2229/topic/migration.20bug/near/245022894">said</a>:</p>
<blockquote>
<p>I suppose this duplicate method should also be removed</p>
</blockquote>
<p>ah, hmm, good point :)</p>



<a name="245023570"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/245023570" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#245023570">(Jul 06 2021 at 11:11)</a>:</h4>
<p>it looks ever so slightly different (it takes a <code>cause</code>, for example)</p>



<a name="245025682"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/245025682" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#245025682">(Jul 06 2021 at 11:34)</a>:</h4>
<p>Okay fixing this as well</p>



<a name="245050530"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/245050530" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#245050530">(Jul 06 2021 at 14:57)</a>:</h4>
<p>So I'm usure what part of the code resulted in this changed lint being outputted</p>



<a name="245050578"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/245050578" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#245050578">(Jul 06 2021 at 14:57)</a>:</h4>
<p><a href="https://github.com/rust-lang/rust/pull/86901#issuecomment-874693797">https://github.com/rust-lang/rust/pull/86901#issuecomment-874693797</a></p>



<a name="245050716"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/245050716" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#245050716">(Jul 06 2021 at 14:58)</a>:</h4>
<p>The solution is almost correct it should be <code>Option::&lt;_&gt;::from()</code></p>



<a name="245058341"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/245058341" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#245058341">(Jul 06 2021 at 15:49)</a>:</h4>
<p><span class="user-mention" data-user-id="281950">@Aman Arora</span> that code calls <code>type_implements_trait</code>; I expect the difference is that the function is now working correctly</p>



<a name="245058351"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/245058351" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#245058351">(Jul 06 2021 at 15:49)</a>:</h4>
<p>instead of giving an artificial limit</p>



<a name="245058358"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/245058358" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#245058358">(Jul 06 2021 at 15:49)</a>:</h4>
<p>I would just bless the output</p>



<a name="245058397"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/245058397" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#245058397">(Jul 06 2021 at 15:49)</a>:</h4>
<p>I was going to tell you that for some reason I cannot push to your repo</p>



<a name="245058439"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/245058439" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#245058439">(Jul 06 2021 at 15:50)</a>:</h4>
<p>I'll run with bless</p>



<a name="245084712"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/245084712" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#245084712">(Jul 06 2021 at 19:06)</a>:</h4>
<p>why would depnode size change? <a href="https://github.com/rust-lang/rust/pull/86901">https://github.com/rust-lang/rust/pull/86901</a></p>



<a name="245084738"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/245084738" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#245084738">(Jul 06 2021 at 19:06)</a>:</h4>
<p>I also don't see the issue on my local build, i ran <code>x test --stage 2</code></p>



<a name="245089881"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/245089881" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#245089881">(Jul 06 2021 at 19:48)</a>:</h4>
<p><span class="user-mention" data-user-id="281950">@Aman Arora</span> if we change the set of queries, it can affect the size of the depnode</p>



<a name="245089894"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/245089894" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#245089894">(Jul 06 2021 at 19:48)</a>:</h4>
<p>I don't know why you don't see the issue though</p>



<a name="245091469"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/245091469" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#245091469">(Jul 06 2021 at 20:01)</a>:</h4>
<p><span class="user-mention" data-user-id="281950">@Aman Arora</span> I bet it depends on the architecture</p>



<a name="245091562"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/245091562" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#245091562">(Jul 06 2021 at 20:02)</a>:</h4>
<p>I think it might be because i have debug asserertions off</p>



<a name="245091589"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/245091589" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#245091589">(Jul 06 2021 at 20:02)</a>:</h4>
<p>well i have the line commented out, so its whatever the default is in Config.toml</p>



<a name="245091902"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/245091902" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#245091902">(Jul 06 2021 at 20:05)</a>:</h4>
<p>I pushed the change based on the error that showed up hopefully it makkes the thing compile</p>



<a name="245092398"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/245092398" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#245092398">(Jul 06 2021 at 20:10)</a>:</h4>
<p>ok, I'm trying locally too</p>



<a name="245092432"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/245092432" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#245092432">(Jul 06 2021 at 20:10)</a>:</h4>
<p>do I have access to rust repo?</p>



<a name="245092458"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/245092458" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#245092458">(Jul 06 2021 at 20:10)</a>:</h4>
<p>(if not, can you give it to me)</p>



<a name="245092696"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/migration%20bug/near/245092696" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/migration.20bug.html#245092696">(Jul 06 2021 at 20:12)</a>:</h4>
<p>okay done</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>